Reverse Geocode
- URL:http://<geocodeservice-url>/reverseGeocode
- Version Introduced:9.3
Description
The reverseGeocode operation is performed on a geocode service resource. The result of this operation is a reverse-geocoded address resource. This resource provides information about all the address fields pertaining to the reverse-geocoded address as well as its exact location.
You can provide arguments to the reverseGeocode operation as query parameters defined in the following parameters table:
Request parameters
Parameter |
Details |
---|---|
f |
Description: The response format. The default response format is html. Values: html | json | kmz |
location | Description: The point at which to search for the closest address. The structure of the point is the same as the structure of the json point object returned by the ArcGIS REST API. In addition to the JSON structure, you can specify the location with a simple comma-separated syntax. Syntax:
Examples:
If not specified in the JSON object or if you're using the simple comma-separated syntax, the location is assumed to be in the same spatial reference as that of the geocode service. |
distance | Description: The distance in meters from the given location within which a matching address should be searched. If this parameter is not provided or an invalid value is provided, a default value of 0 meters is used. Example: distance=100 |
outSR | Description: The well-known ID of the spatial reference or a spatial reference json object for the returned address candidates. For a list of valid WKID values, see Projected coordinate systems and Geographic coordinate systems. This parameter was added at 10.0. |
Example usage
Example 1: Reverse geocode based on a point:
JSON response syntax
{"address" : { "<fieldName1>" : "<fieldValue1>", "<fieldName2>" : "<fieldValue2>"},"location" : { <point> }}
JSON response example
{"address" : { "Street" : "771 TUNNEL AVE", "Zone" : "94005"},"location" : { "x" : -122.400260954336, "y" : 37.7000445053795,"spatialReference": {"wkid": 4269}}}