原文地址:http://blog.csdn.net/lxping1012/article/details/7477811
ArcGIS Server中的 Image Service 能够提供对影像原始数据的动态访问,得到其元数据(metadata):
包括自定义的空间参考,图幅范围,像元大小,像元类型,波段数,以及各波段的基础统计信息(最小值,最大值,平均值之
类);能够根据相关参数生成新的影像,同时在arcgis server 10版本中还添加了针对栅格数据的查询和下载功能。最重要的是不同
于map service(不论是cache或non-cache),能够对影像做一些处理,比如计算NDVI,坡度,坡向,进行Standard Deviation拉
伸、直方图均匀化拉伸,minmax拉伸等基本处理。虽然和专门的影像处理软件完全不能比较,但是能在网络上进行遥感影像处理。
为了能利用ArcGIS Flex API浏览ImageServer服务并对栅格地图进行渲染,我参考了ArcGIS有关服务的帮助和例子http:/
/help.arcgis.com/en/webapi/flex/samples/index.html#/Shaded_relief_raster_function/01nq00000066000000/里面
讲解了ImageServer服务几种栅格渲染的方法,ArcGISImageServiceLayer是通过renderingRule来进行渲染的,
但renderingRule的类型为RasterFunction,看到RasterFunction中的functionName和arguments属性,这让我一头雾水。
The Aspect
raster function takes no arguments. Hence, specifying only the rasterFunction
property suffices in this case.
{ "rasterFunction" : "Aspect" }
The arguments for the Colormap
function are as shown below:
{ "rasterFunction" : "Colormap", "rasterFunctionArguments" : { "ColormapName" : "", "Colormap" : [ [ , , , ], //[int, int, int, int] [ , , , ] ] }, "variableName" : "Raster" }
Example 1:
{ "rasterFunction" : "Colormap", "rasterFunctionArguments" : { "ColormapName" : "Random" }, "variableName" : "Raster" }
Example 2:
{ "rasterFunction" : "Colormap", "rasterFunctionArguments" : { "Colormap" : [ [0, 1, 2, 3], [2, 45, 52, 13] ] }, "variableName" : "Raster" }
The arguments for the Hillshade
function are as shown below:
{ "rasterFunction" : "Hillshade", "rasterFunctionArguments" : { "Azimuth" :, //double (e.g. 215.0) "Altitude" : , //double (e.g. 75.0) "ZFactor" : //double (e.g. 0.3) }, "variableName" : "DEM" }
Example:
{ "rasterFunction" : "Hillshade", "rasterFunctionArguments" : { "Azimuth" : 215.0, "Altitude" : 75.0, "ZFactor" : 0.3 }, "variableName" : "DEM" }
The arguments for the NDVI
function are as shown below:
{ "rasterFunction" : "NDVI", "rasterFunctionArguments" : { "VisibleBandID" :, //int (zero-based band id, e.g. 2) "InfraredBandID" : //int (zero-based band id, e.g. 1) }, "variableName" : "Raster" }
Example:
{ "rasterFunction" : "NDVI", "rasterFunctionArguments" : { "VisibleBandID" : 2, "InfraredBandID" : 1 }, "variableName" : "Raster" }
The arguments for the ShadedRelief
function are as shown below:
{ "rasterFunction" : "ShadedRelief", "rasterFunctionArguments" : { "Azimuth" :, //double (e.g. 215.0) "Altitude" : , //double (e.g. 75.0) "ZFactor" : , //double (e.g. 0.3) "Colormap" : [ [ , , , ], //[int, int, int, int] [ , , , ] ] }, "variableName" : "Raster" }
Example:
{ "rasterFunction" : "ShadedRelief", "rasterFunctionArguments" : { "Azimuth" : 215.0, "Altitude" : 75.0, "ZFactor" : 0.3, "Colormap" : [ [0, 1, 2, 3], [2, 45, 52, 13] ] }, "variableName" : "Raster" }
The arguments for the Slope
function are as shown below:
{ "rasterFunction" : "Slope", "rasterFunctionArguments" : { "ZFactor" ://double (e.g. 0.3) }, "variableName" : "DEM" }
Example:
{ "rasterFunction" : "Slope", "rasterFunctionArguments" : { "ZFactor" : 0.3 }, "variableName" : "DEM" }
The arguments for the Statistics
function are as shown below:
{ "rasterFunction" : "Statistics", "rasterFunctionArguments" : { "Type" : "", "KernelColumns" : , //int (e.g. 3) "KernelRows" : //int (e.g. 3) }, "variableName" : "Raster" }
Example:
{ "rasterFunction" : "Statistics", "rasterFunctionArguments" : { "Type" : "Mean", "KernelColumns" : 3, "KernelRows" : 3 }, "variableName" : "Raster" }
The arguments for the Stretch
function are as shown below:
{ "rasterFunction" : "Stretch", "rasterFunctionArguments" : { "StretchType" :, //int (0 = None, 3 = StandardDeviation, 4 = Histogram Equalization, 5 = MinMax) "NumberOfStandardDeviations" : , //int (e.g. 2) "Statistics" : [ [ , , , ], //[double, double, double, double] [ , , , ] ], "Gamma" : [ , ] //array of doubles }, "variableName" : "Raster" }
Example:
{ "rasterFunction" : "Stretch", "rasterFunctionArguments" : { "StretchType" : 3, "NumberOfStandardDeviations" : 2, "Statistics" : [ [0.2, 222.46, 99.35, 1.64], [5.56, 100.345, 45.4, 3.96], [0, 352.37, 172.284, 2] ], "Gamma" : [1.25, 2, 3.95] }, "variableName" : "Raster" }