- URL:
- https://<root>/Utilities/Geometry/GeometryServer/toGeoCoordinateString
- Methods:
GET
- Version Introduced:
- 10.3
Description
The to
operation is performed on a geometry service resource. The operation converts an array of xy-coordinates into well-known strings based on the conversion type and spatial reference supplied by the user. Optional parameters are available for some conversion types. Note that if an optional parameter is not applicable for a particular conversion type, but a value is supplied for that parameter, the value will be ignored.
Request parameters
Parameter | Details |
---|---|
| Specifies the well-known ID of the spatial reference or a spatial reference json object. For a list of valid WKID values, see Using spatial references. |
| Specifies an array of xy-coordinates in JSON format to be converted. Syntax
Example
|
| Specifies the conversion type of the input strings. Valid conversion types are as follows:
|
(Optional) | Specifies the conversion options for MGRS and UTM conversion types. Valid conversion modes for MGRS are as follows:
Valid conversion modes for UTM are as follows:
|
(Optional) | Sets the number of digits to output for each of the numerical portions in the string. The default value for
|
(Optional) | If true, numeric portions of the string are rounded to the nearest whole magnitude as specified by Values: |
(Optional) | If true, spaces are added between components of the string. The Values: |
| The response format. The default format is Values: |
Example usage
The following is a decoded sample request URL for to
that demonstrates how to convert three sets of xy-coordinates to geographic strings in MGRS. The actual URL must be encoded.
JSON Response syntax
The output is a JSON object containing an array of strings.
{"strings":[<string1>,...,<stringN>]}
JSON Response example
The output of the example given above is a JSON object containing an array of three strings. Notice that 180 degrees longitude is in Zone 01.
{"strings": [
"01NAA6602144300000000",
"11SNT0000000062155977",
"31UBT9407108165288254"
]}