- URL:
- https://<imageservice-url>/measureFromImage
- Methods:
GET
- Required Capability:
- Catalog, Mensuration
- Version Introduced:
- 11.2
Description
The measure
operation provides mensuration capabilities within one image space and returns the measurement result in a map space unit. When t
is specified, this operation returns distance between the two geometries. When t
is not specified, this operation returns length for a polyline geometry and area for a polygon geometry.
Request parameters
Parameter | Details |
---|---|
| Specifies the Example
|
| A geometry defines the from location of the measurement. If the spatial reference is missing, the coordinate is assumed to be in image space set through The structure of the geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS Rest API. Example
Syntax:
|
| A geometry that defines the to location of the measurement. If The structure of the geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS Rest API. Example
Syntax:
|
| The type of geometry specified by the Values: |
|
The response format. The default response format is Values: |
Example usages
The following is a sample request for the measure
operation that will return the area for a polygon on the raster item with a raster
of 1:
https://machine.domain.com/webadaptor/rest/services/imageinspection/ImageServer/measureFromImage?fromGeometry={"rings":[[[407.19,-47.54],[4073.19,-478.54],[404.19,-477.54],[407.19,-47.54]]]}&toGeometry=&geometryType=esriGeometryPolygon&rasterId=1&f=html
The following is a sample request for the measure
operation that will return the distance in the map space between two points on the raster item with a raster
of 1:
https://machine.domain.com/webadaptor/rest/services/imageinspection/ImageServer/measureFromImage?fromGeometry={"x": 110, "y": -222, "z": 632.83443, "spatialReference": { "wkid": 32611, "latestWkid": 32611 }}&toGeometry={"x": 110, "y": -232, "z": 632.83443, "spatialReference": { "wkid": 32611, "latestWkid": 32611 }}&geometryType=esriGeometryPoint&rasterId=1&f=html
JSON Response syntax
Measure points
{
"Shape": {
"x": x,
"y": y,
"z": z,
"spatialReference": {
<spatialReference>
}
},
"To": {
"x": x,
"y": y,
"z": z,
"spatialReference": {
<spatialReference>
}
},
"Distance": <distance>
}
Measure polylines syntax
{
"Shape": {
"hasZ": <true|false>,
"paths": [
[
[<x11>, <y11>, <z11>, <m11>],
[<x1N>, <y1N>, <z1N>, <m1N>]
],
[
[<xk1>, <yk1>, <zk1>, <mk1>],
[<xkM>, <ykM>, <zkM>, <mkM>]
]
],
"spatialReference": {<spatialReference>}
},
"To": {
"hasZ": <true|false>,
"paths": [
[
[<x11>, <y11>, <z11>, <m11>],
[<x1N>, <y1N>, <z1N>, <m1N>]
],
[
[<xk1>, <yk1>, <zk1>, <mk1>],
[<xkM>, <ykM>, <zkM>, <mkM>]
]
],
"spatialReference": {<spatialReference>}
},
"Distance": <distance>
}
Measure polygons syntax
{
"Shape": {
"hasZ": <true | false>,
"rings": [
[
[<x11>, <y11>, <z11>, <m11>],
[<x1N>, <y1N>, <z1N>, <m1N>]
],
[
[<xk1>, <yk1>, <zk1>, <mk1>],
[<xkM>, <ykM>, <zkM>, <mkM>]
]
],
"spatialReference": {<spatialReference>}
},
"To": {
"hasZ": <true | false>,
"rings": [
[
[<x11>, <y11>, <z11>, <m11>],
[<x1N>, <y1N>, <z1N>, <m1N>]
],
[
[<xk1>, <yk1>, <zk1>, <mk1>],
[<xkM>, <ykM>, <zkM>, <mkM>]
]
],
"spatialReference": {<spatialReference>}
},
"Distance": <distance>
}
JSON Response examples
If no t
is specified, the operation returns Area
for polygon.
{
"Shape": {
"hasZ": true,
"rings": [
[
[
491379.1529131501,
3762876.9130988657,
632.83443
],
[
491401.72644230135,
3762975.667604944,
632.83443
],
[
491390.9020118707,
3762875.5665160273,
632.83443
],
[
491379.1529131501,
3762876.9130988657,
632.83443
]
]
],
"spatialReference": {
"wkid": 32611,
"latestWkid": 32611
}
},
"Length": 213.8122642642981,
"Center": {
"x": 491390.51673341653,
"y": 3762917.499733549
},
"Area": 595.3367839888944
}
Measure distance between two points specified in from
and t
parameters:
{
"Shape": {
"x": 110,
"y": -222,
"z": 632.83443,
"spatialReference": {
"wkid": 32611,
"latestWkid": 32611
}
},
"To": {
"x": 110,
"y": -232,
"z": 632.83443,
"spatialReference": {
"wkid": 32611,
"latestWkid": 32611
}
},
"Distance": 10
}