FRAMES | NO FRAMES | Description | Parameters | Examples | Response |
URL | http://<imageservice-url>/measure |
Parent Resource | Image Service |
---|---|
Required Capability | Mensuration |
This operation is supported from 10.1 onwards.
The measure operation is performed on an image service resource.
It lets a user 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, sensor name and measured values.
The measure operation can be supported by image service from raster datasets and mosaic datasets. Spatial reference is required to perform basic measurement (distance, area, etc). Sensor metadata (geodata transformation) needs to be present in the data source used by image service to enable height measurement (e.g. imagery with RPCs). 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 parameters table below.
Parameter | Details |
---|---|
f |
Description: The response format. The default
response format is html. Values: html | json |
fromGeometry |
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 simpler 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:
|
toGeometry |
Description: A geometry that defines the
"to" location of the measurement. The type of the geometry must be the same as
"fromGeometry". 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 simpler 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:
|
geometryType |
Description: The type of geometry specified by the fromGeometry and toGeometry
parameters. The geometry type can be a point, polygon or envelope. The default geometry type is a point.Values: esriGeometryPoint | esriGeometryPolygon | esriGeometryEnvelope
|
measureOperation |
Required Specifies the type of measure being performed Values: esriMensurationPoint | esriMensurationDistanceAndAngle | esriMensurationAreaAndPerimeter | esriMensurationHeightFromBaseAndTop |
esriMensurationHeightFromBaseAndTopShadow | esriMensurationHeightFromTopAndTopShadow | esriMensurationCentroid |
esriMensurationPoint3D | esriMensurationDistanceAndAngle3D | esriMensurationAreaAndPerimeter3D | esriMensurationCentroid3D
Different measureOperation type requires different from/to geometries: esriMensurationPoint,esriMensurationPoint3D : requires only fromGeometry , type: {Point} esriMensurationDistanceAndAngle,esriMensurationDistanceAndAngle3D,esriMensurationHeightFromBaseAndTop,esriMensurationHeightFromBaseAndTopShadow,esriMensurationHeightFromTopAndTopShadow : requires both fromGeometry and toGeometry , type: {Point} esriMensurationAreaAndPerimeter,esriMensurationAreaAndPerimeter3D,esriMensurationCentroid,esriMensurationCentroid3D : requires only fromGeometry , type: {Polygon}, {Envelope} |
pixelSize |
Description: The pixel level
(resolution) being measured. If pixel size is not specified, then pixelSize will
default to the base resolution of the image service. The raster at the specified
pixel size in the mosaic dataset will be used for measurement.
The structure of the pixelSize parameter is the same as the
structure of the point object
returned by the ArcGIS REST API. In addition to the JSON structure, you can
specify the pixel size with a simpler comma-separated syntax.
Syntax:
|
mosaicRule |
Description: Specifies the mosaic rule when defining how individual
images should be mosaicked. It specifies selection, mosaic method, sort order,
overlapping pixel resolution, etc. When mosaic rule is not specified, mosaic
rule will default to esriMosaicNone. The first visible image is used by
measure. Syntax: { "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>" } { "mosaicMethod" : "esriMosaicLockRaster", "lockRasterIds" : [32, 454, 14] } |
linearUnit |
Description: The linear unit in which height, length, or perimeters will be calculated. It can be any of the following esriUnits constant.
If unit is not specified, the default is esriMeters. The list of valid esriUnits constants include:
For the description of each unit, see esriUnits constants. |
angularUnit |
Description: The angular unit in which directions of line segments will be calculated. It can be one of the following esriDirectionUnits constant:
If unit is not specified, the default is esriDUDecimalDegrees. For the description of each unit, see esriDirectionUnits constants. |
areaUnit |
Description: The area unit in which areas of polygons will be calculated. It can be any esriAreaUnits constant. If unit is not specified, the default is esriSquareMeters. The list of valid esriAreaUnits constants include:
For the description of each unit, see esriAreaUnits constants.
|
Example 1: Height measurement.
http://myserver:port/arcgis/rest/services/myservice/ImageServer/measure?fromGeometry={"x":-117.19944857,"y":34.05586888,"spatialReference":{"wkid":4326}}&toGeometry={"x":-117.19940048,"y":34.05589815,"spatialReference":{"wkid":4326}}&geometryType=esriGeometryPoint&measureOperation=esriMensurationHeightFromBaseAndTop&mosaicRule=&pixelSize=&f=pjson
Example 2: Distance measurement.
http://myserver:port/arcgis/rest/services/myservice/ImageServer/?measure?fromGeometry={"x":-117.19944857,"y":34.05586888,"spatialReference":{"wkid":4326}}&toGeometry={"x":-117.19940048,"y":34.05589815,"spatialReference":{"wkid":4326}}&geometryType=esriGeometryPoint&measureOperation=esriMensurationDistanceAndAngle&mosaicRule=&f=pjson
Example 3: Area and perimeter measurement.
http://myserver:port/arcgis/rest/services/myservice/ImageServer/measure?fromGeometry={"xmin":-117.19944857,"ymin":34.05586888,"xmax":-117.19940048,"ymax":34.05589815,"spatialReference":{"wkid":4326}}&geometryType=esriGeometryEnvelope&measureOperation=esriMensurationAreaAndPerimeter&mosaicRule=&linearUnit=esriInches&angularUnit=esriDURadians&areaUnit=esriSquareFeet&f=pjson
Example 4: Point measurement.
http://myserver:port/arcgis/rest/services/myservice/ImageServer/ImageServer/measure?fromGeometry={"x":-117.19944857,"y":34.05586888,"spatialReference":{"wkid":4326}}&toGeometry=&geometryType=esriGeometryPoint&measureOperation=esriMensurationPoint&mosaicRule=&pixelSize=&f=pjson
Example 5: Point measurement and MGRS unit.
http://myserver:port/arcgis/rest/services/myservice/ImageServer/ImageServer/measure?fromGeometry={"x":-117.19944857,"y":34.05586888,"spatialReference":{"wkid":4326}}&toGeometry=&geometryType=esriGeometryPoint&measureOperation=esriMensurationPoint&mosaicRule=&pixelSize=&coordinateUnit=esriDCUTypeMGRS&f=pjson
Example 6: Centroid measurement
http://myserver:port/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
{ "name" : "<name>", "sensorName" : "<sensorName>", "height" : <height>, //only for the following measureOpetion: 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> }
{ "name": "08MAY18184148-P1BS-005765570010_02_P002", "sensorName": "RPC", "height": { "value": 15273.76266854526, "displayValue": "1.5e+04", "uncertainty": 1838.5614213195531, "unit": "esriMillimeters" } }
{ "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" } }
{ "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" } }
{ "name": "08MAY18184148-P1BS-005765570010_02_P002", "sensorName": "RPC", "point": {"value": { "x": -117.19944857, "y": 34.05586888, "spatialReference": { "wkid": 4326, "latestWkid": 4326 } }} }