{
"rasterFunction" : "<resterFunctionName>",
"rasterFunctionArguments" : {
"argument1":<value1>,
"argument2":<value2>,
…
"argumentn":<valuen>,
},
"variableName": "<variableName>" //optional, defaulet is 'Raster' for raster function templates.
}| 函数名 | 参数 | 功能描述 | 适用范围 |
|---|---|---|---|
| Slope | 无 | 地形坡度计算 | DEM 数据(单波段数据类型栅格数据) |
| Remap | 一个或一组范围,如[0, 120] | 值映射,输出值(Short); | 单波段栅格数据 |
| ColorMap | 颜色映射 | 颜色映射,将单波段 Short 类型数据映射成 RGB 数据(3波段) | 单波段 Short 类型栅格数据 |
| Clip | 多边形 , 裁剪类型(内,外(缺省)) | 多边形裁剪 | RGB 三波段栅格数据 |
| And | 加的栅格数据 | 逻辑加 | 单波段 Short 类型栅格数据,加与被加的栅格数据Size 相同 |
| Mul | 乘的栅格数据,栅格数据的波段索引(缺省为 0) | 数字乘 | 数据类型(非 Byte 类型)栅格数据,乘与被乘的栅格数据 Size 相同 |
| Brightness | 亮 度 偏 移 值(-100-100,-100 是减少一个平均值,100 是增加一个平均值) | 亮度调整 | RGB 三波段栅格数据 |
| Sum | 无 | 值乘面积求和,栅格数据所有格网点的值与该点球面面积的乘积求和 | 数字类型栅格数据 |
| Area | 指定值 | 栅格数据中所有与指定值相等的网格点面积和 | 任意栅格数据 |
{
"rasterFunction": "Arithmetic",
"rasterFunctionArguments" : {
"Raster2": "example", //raster
"Index":1, //bandid
"Opration":2 //1:+, 2:-, 3:*, 4:/
}
}{
"rasterFunction" : "ContrastBrightness ",
"rasterFunctionArguments" : {
"ContrastOffset":30, //double,-100 to 100
"BrightnessOffset":10 //double,-100 to 100
}
}{
"rasterFunction" : "Clip",
"rasterFunctionArguments" : {
"ClippingGeometry":{
"rings":[[[10,10],[9,11],[10,12],[11,11],[11,12],[10,10]]],
"spatialReference":{ "wkid":4326}
}, //a polygon or envelop
"ClippingType":1 // 1=clippingOutside,2=clippingInside
}
}{
"rasterFunction" : " Colormap",
"rasterFunctionArguments" : {
"Colormap":[
[1, 255, 0, 0], // [<value1>, <red1>, <green1>, <blue1>]
[2, 0, 255, 0],
[3, 125, 25, 255],
…
]
}
}{
"rasterFunction" : " ColorRamp",
"rasterFunctionArguments" : {
"Ranges":[-30,40] //-30 is blue , 40 is red
}
}{
"rasterFunction" : " Remap",
"rasterFunctionArguments" : {
"InputRanges" : [0,100,101,200], //input ranges are specified in pairs: from (inclusive) and to (exclusive).
"OutputValues" : [5,125], // output values of corresponding input ranges
}, // [0,100] -> 5, [101,200] -> 125
"variableName" : "Raster"
}{
"rasterFunction" : " Slope",
"rasterFunctionArguments" : {}
}{
"rasterFunction" :***,//函数1
"rasterFunctionArguments" : {
"Raster":{
"rasterFunction":***,//函数2
"rasterFunctionArguments" :{
"Raster":{
… //函数3
},
… //其他函数参数
}
},
… //其他函数参数
}
}{
"rasterFunction": "Clip",
"rasterFunctionArguments": {
"ClippingGeometry": {
"rings" : [[[10,10], [9,11], [10,12], [11,11], [12,10],[10,10]]],
"spatialReference" : {"wkid" : 4326}
},
"ClippingType": 1
"Raster":{ // 0 -> RGB(255,0,0), 1 -> RGB(0,0,255)
"rasterFunction" : "Colormap",
"rasterFunctionArguments" : {
"Colormap" : [
[0, 255, 0, 0],
[1, 0, 0, 255]
],
"Raster":{ // [-50,0] -> 0 , [0,50] -> 1
"rasterFunction": "Remap",
"rasterFunctionArguments": {
"InputRanges": [-50,0, 0,50],
"OutputValues": [0,1]
}
}
}
}
}
}