ImageServer能够直接获得影像服务的栅格值,ImageServer支持 导出图像 ,查询,识别 , 下载 操作,查看ArcGIS Server REST API的帮助得到进行Identity操作需要遵循mosicRule,mosicRule所需的参数如下:
{ "mosaicMethod" : "<esriMosaicNone | esriMosaicCenter | esriMosaicNadir | esriMosaicViewpoint | esriMosaicAttribute | esriMosaicLockRaster | esriMosaicNorthwest | esriMosaicSeamline>", "where" : "<where>", "sortField" : "<sortFieldName>", "sortValue" : <sortValue>, "ascending" : <true | false>, "lockRasterIds" : [<rasterId1>, <rasterId2>], "viewpoint" : <point>, "fids" : [<fid1>, <fid2>], "mosaicOperation" : "<MT_FIRST | MT_LAST | MT_MIN | MT_MAX | MT_MEAN | MT_BLEND>" }在Flex中利用ArcGIS API,使用方法如下:
var imageIdentify:ImageServiceIdentifyTask=new ImageServiceIdentifyTask(imageLayer.url);
var parm:ImageServiceIdentifyParameters=new ImageServiceIdentifyParameters();
var mosaicRule:MosaicRule=new MosaicRule();
mosaicRule.ascending=false;
mosaicRule.method="esriMosaicCenter";
parm.geometry=mapPoint;
parm.mosaicRule=mosaicRule;
parm.pixelSizeX=imageLayer.pixelSizeX;
parm.pixelSizeY=imageLayer.pixelSizeY;
imageIdentify.execute(parm,new AsyncResponder(onResult,onFault));
//成功执行的操作
private function onResult(imageResult : ImageServiceIdentifyResult, token : Object = null):void
{
var value:String=imageResult.value.toString();
}
//出现错误的操作
private function onFault(info : Object, token : Object = null):void
{
}