- URL:
- https://<imageservice-url>/measure
- Methods:
GET
- Required Capability:
- Mensuration
- Version Introduced:
- 10.1
Description
The measure
operation is performed on an image service resource. It allows a user to measure distance, direction, area, perimeter, and height from an image service. The result of this operation includes the name of the raster dataset being used, the sensor name, and measured values.
The measure
operation can be supported by image services from raster datasets and mosaic datasets. Spatial reference is required to perform basic measurement (distance, area, and so on). Sensor metadata (geodata transformation) needs to be present in the data source used by an image service to enable height measurement (for example, imagery with RPCs). The mosaic dataset or service needs to include DEM to perform 3D measure.
Users can provide arguments to the measure
operation as query parameters. The parameter details are provided in the following parameters table.
For more information about making measurements from imagery, see the help topic.
Request parameters
Parameter | Details |
---|---|
|
The response format. The default response format is Values: |
(Required) | Description: A geometry that defines the from location of the measurement. The structure of the geometry is the same as the structure of the JSON geometry objects returned by the ArcGIS REST API. In addition to the JSON structures, for points, you can specify the geometry with a simple comma-separated syntax. By default, the geometry is assumed to be in the spatial reference of the image service. You can specify a different spatial reference by using the JSON structure syntax for geometries. Syntax:
Examples:
|
| Description: A geometry that defines the to location of the measurement. The type of geometry must be the same as By default, the geometry is assumed to be in the spatial reference of the image service. You can specify a different spatial reference by using the JSON structure syntax for geometries. Syntax:
Examples:
|
| Description: The type of geometry specified by the Values: |
(Required) | Specifies the type of measure being performed. Values: Different
Supported
|
| Description: The pixel level (resolution) being measured. If pixel size is not specified, The structure of the Syntax:
Examples:
|
| Description: Specifies the mosaic rule when defining how individual images should be mosaicked. When a mosaic rule is not specified, the default mosaic rule of the image service will be used (as advertised in the root resource: See the mosaic rule JSON objects for the syntax and examples. |
| Description: The linear unit in which height, length, or perimeters will be calculated. It can be any of the following
For the description of each unit, see esriUnits constants. |
| Description: The angular unit in which directions of line segments will be calculated. It can be one of the following
If the unit is not specified, the default is esriDUDecimalDegrees. For the description of each unit, see esriDirectionUnits constants. |
| Description: The area unit in which areas of polygons will be calculated. It can be any
For the description of each unit, see esriAreaUnits constants. |
Example usage
Example 1: Height measurement of the CN Tower from an IKONOS image
Example 2: Distance measurement
Example 3: Area and perimeter measurement
Example 4: Point measurement
Example 5: Centroid measurement
https://myserver.mydomain.com/arcgis/rest/services/myservice/ImageServer/ImageServer/measure?fromGeometry={"xmin":-117.19944857,"ymin":34.05586888,"xmax":-117.19940048,"ymax":34.05589815,"spatialReference":{"wkid":4326}}&geometryType=esriGeometryEnvelope&measureOperation=esriMensurationCentroid&mosaicRule=&f=pjson
JSON response syntax
{
"name" : "<name>",
"sensorName" : "<sensorName>",
"height" : <height>, //only for the following measureOperation: esriMensurationHeightFromBaseAndTop,esriMensurationHeightFromBaseAndTopShadow,esriMensurationHeightFromTopAndTopShadow
"area" : <area> //only for esriMensurationAreaAndPerimeter,esriMensurationAreaAndPerimeter3D
"perimeter" : <perimeter> //only for esriMensurationAreaAndPerimeter,esriMensurationAreaAndPerimeter3D
"distance" : <distance> //only for esriMensurationDistanceAndAngle,esriMensurationDistanceAndAngle3D
"azimuthAngle":<azimuthAngle> //only for esriMensurationDistanceAndAngle,esriMensurationDistanceAndAngle3D
"elevationAngle":<elevationAngle> //only for esriMensurationDistanceAndAngle3D
"point" : <pointmeasurement> //only for esriMensurationCentroid,esriMensurationPoint,esriMensurationPoint3D,esriMensurationCentroid3D
}
Height/area/perimeter/distance/azimuthangle/elevationangle objects:
{
"<value>" : <value>,//raw double values computed, used together with uncertainty
"<uncertainty>" : <Uncertainty>//uncertainty of the measurement, used together with measured value. Please note for most commercial imagery, it represents only click uncertainty.
"<displayValue>" : <DisplayValue>//measured value represented in significant figures in string format
"<unit>" : "<Unit>"//unit representing LinearUnit, AreaUnit, and AngularUnit as defined in the request
}
Point measurement object JSON syntax:
{
"<value>" : <point>
}
JSON response example 1 (for the following measure Operation: esri Mensuration Height From Base A n d Top, esri Mensuration Height From Base A n d T o p Shadow, esri Mensuration Height From T o p A n d T o p Shadow
)
{
"name": "08MAY18184148-P1BS-005765570010_02_P002",
"sensorName": "RPC",
"height": {
"value": 15273.76266854526,
"displayValue": "1.5e+04",
"uncertainty": 1838.5614213195531,
"unit": "esriMillimeters"
}
}
JSON response example 2 (for the following measure Operation: esri Mensuration Distance A n d Angle
)
{
"name": "08MAY18184148-P1BS-005765570010_02_P002",
"sensorName": "RPC",
"distance": {
"value": 5500.337504324923,
"displayValue": "5.5e+03",
"uncertainty": 645.3512557047002,
"unit": "esriMillimeters"
},
"azimuthAngle": {
"value": 58.673197026401894,
"displayValue": "58.67319702640189",
"uncertainty": -1,
"unit": "esriDUDecimalDegrees"
}
}
JSON response example 3 (for the following measure Operation: esri Mensuration Area A n d Perimeter, esri Mensuration Area A n d Perimeter3D
)
{
"name": "RedlandsWGS84",
"sensorName": "Unknown",
"area": {
"value": 226.28020776466562,
"displayValue": "226.2802077646656",
"uncertainty": -3.8610215855E-7,
"unit": "esriSquareMiles"
},
"perimeter": {
"value": 61.21851284354401,
"displayValue": "61.21851284354401",
"uncertainty": -6.2137119224E-4,
"unit": "esriMiles"
}
}
JSON response example 4 (for the following measure Operation: esri Mensuration Centroid, esri Mensuration Point, esri Mensuration Point3D, esri Mensuration Centroid3D
)
{
"name": "08MAY18184148-P1BS-005765570010_02_P002",
"sensorName": "RPC",
"point": {"value": {
"x": -117.19944857,
"y": 34.05586888,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}}
}
JSON response example 5 (for the following measure Operation: esri Mensuration Distance A n d Angle3D
)
{
"name": "08MAY18184148-P1BS-005765570010_02_P002.NTF:0",
"sensorName": "RPC",
"distance": {
"value": 0,
"displayValue": "0",
"uncertainty": 0,
"unit": "esriDecimalDegrees"
},
"azimuthAngle": {
"value": 359.45477179661953,
"displayValue": "359.4547717966195",
"uncertainty": -1,
"unit": "esriDUDecimalDegrees"
},
"elevationAngle": {
"value": 1.832464078203601,
"displayValue": "1.832464078203601",
"uncertainty": -1,
"unit": "esriDUDecimalDegrees"
}
}