- URL:https://<geometry service url>/fromGeoCoordinateString
 - Related Resources:To GeoCoordinateString
 - Version Introduced:10.3
 
Description
The fromGeoCoordinateString operation is performed on a geometry service resource. The operation converts an array of well-known strings into x,y coordinates based on the conversion type and spatial reference supplied by the user. An optional conversion mode parameter is available for some conversion types.
Request parameters
| Parameter | Details | 
|---|---|
| sr | Specifies the well-known ID of the spatial reference or a spatial reference json object. For a list of valid WKID values, see Using a spatial reference.  | 
| strings | Specifies an array of strings formatted as specified by conversionType. Syntax Example  | 
| conversionType | Specifies the conversion type of the input strings. The following are valid conversion types: 
  | 
| conversionMode (Optional)  | Specifies the conversion options for MGRS, UTM, and GARS conversion types. The following are valid conversion modes for MGRS: 
 The following are valid conversion modes for UTM: 
 The following are valid conversion modes for GARS: 
  | 
| f | The response format. The default format is html. Values: html | json | pjson  | 
Example usage
The following is a sample request URL for fromGeoCoordinateString. In this example, three strings are converted in the World Geographic Reference System (GeoRef) format to x,y coordinates.
https://machine.domain.com/webadaptor/rest/services/Utilities/Geometry/GeometryServer/fromGeoCoordinateString?sr=4326&strings=["ZGQA5999999900000000","EJCE3864000012728040","NKBH1196052000273924" ]&conversionType=GeoRef&f=pjsonJSON Response syntax
The output is a JSON object containing an array of x,y coordinates.
{"coordinates":[[x1,y1],...,[xN,yN]]}JSON Response example
The output from the above example is a JSON object containing a three-element array of x,y coordinates.
{
  "coordinates": [
    [
      179.99999998333334,
      0
    ],
    [
      -117.356,
      34.212134
    ],
    [
      1.199342,
      52.0045654
    ]
  ]
}