- URL:
- https://<geocodeservice-url>/reverseGeocode
- Methods:
GET
- Version Introduced:
- 9.3
Description
The reverse
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.
The reverse
operation determines the address at a particular x,y location. You pass the coordinates of a point location to the geocode service, and the service returns the address or place that is closest to the location.
New at 11.2
- Polygon output fields added to a locator by the Add Polygon Fields To Locator tool in ArcGIS Pro 3.2 or later, will be returned within the
attributes
object of thereverse
response as part of the output fields.Geocode
New at 10.9
- Maintaining side offset, end offset, and custom intersection connectors settings requires a locator created in ArcGIS Pro 2.7 or later with the Street Address role.
- Support for
Subaddress
feature
requires a locator created in ArcGIS Pro 2.8 or later.Types
New at 10.8
The preferred
parameter allows simple configuration of output fields returned in a response from the geocode service by specifying which address component values will be included in output fields.
Request parameters
Parameter | Details |
---|---|
(Required) | The point from which to search for the closest address or place. The point can be represented as a simple, comma-separated syntax or as a JSON point object. The default spatial reference of the comma-separated syntax is the same as the data used to build the locator on which the geocode service is based. Use JSON formatting to specify another coordinate system for the input location. Specifically, set the spatial reference using its well-known ID (WKID) value. For a list of valid WKID values, see Using spatial references. Example
|
(Required) | Specifies a token that provides the identity of a user who has the necessary permissions to access the service. |
(Optional) | The spatial reference of the x,y coordinates returned by a geocode request. This is useful for applications using a map with a spatial reference different than that of the geocode service. The spatial reference can be specified as either a WKID or as a JSON spatial reference object. If For a list of valid WKID values, see Using spatial references. Example
|
(Optional) | Sets the language in which geocode results are returned. Addresses and places in many countries are available in more than one language; in these cases, the See the table of supported countries for valid language code values in each country. Full language names cannot be used in the If the It is important to note that Example
|
(Optional) | Limits the possible match types returned by the Values: Examples
|
(Optional) | Specifies whether the output geometry of Geocode results include one geometry object (the It is important to note that Values: |
(Optional) | Allows simple configuration of output fields returned in a response from the geocode service by specifying which address component values will be included in output fields. A single value or a comma-delimited collection of values are supported as input. If the parameter is blank or excluded from a request, default address label formats will be used. A particular address may have multiple city names associated with it. In the United States for example, all addresses have a ZIP code (postal code) assigned to them. Each ZIP code has one or more associated locality names, which are known as postal cities. There is always one primary postal city value for each ZIP code. ZIP codes typically have no set boundaries, and the primary postal city name for the ZIP code that is assigned to an address may be different than the name of the local city that the address is in. Additional details:
Example:
|
(Optional) | The list of fields to be returned within the The By default, all possible output fields are returned in the response. In other words, passing Example that returns all output fields
Example that returns the specified fields only
|
(Optional) | The If If Example
|
(Required) | The response format. The default response format is Values: |
Reverse geocode details
The purpose of reverse geocoding is to answer the question What's near me? or more specifically, What's near this location? To best answer this question, the reverse
operation returns the most relevant feature near an input location based on a prioritized hierarchy of feature types. With a few exceptions, the same feature types that can be returned by find
can also be returned by reverse
. As long as the location is within the extent of the data used to build the locator on which the geocode service is based, a single feature is returned, even if the location is far from any streets or places. If there are no streets near the input location, large area features such as parks, universities, zoos, or airports may be returned. If the location isn't within the boundary of this type of feature, a postal code or administrative area (such as a city) is returned.
The hierarchy is summarized in the table below, ordered by descending priority. Unless otherwise noted, each feature type is only returned when the distance between the input location and the feature is within the tolerance specified in the Search tolerance column.
Feature type | Search tolerance | Comments |
---|---|---|
| 10 meters | Intersections are only returned when |
| 3 meters | Candidates of type |
| 25 meters | A business or landmark that can be represented by a point. |
| 25 meters | A plot of land that can be represented by a point. |
| 10 meters |
|
| 50 meters | A |
| 100 meters | Candidates of type |
| Within boundary | A business or landmark that can be represented by an area, such as a large park or university. This is not available unless supported by the data used to build the locator on which the geocode service is based. |
| Within boundary | A plot of land that can be represented by an area, such as a parcel or tax lot. This is not available unless supported by the data used to build the locator on which the geocode service is based. |
| Within boundary | If the input location intersects multiple boundaries, the feature with the smallest area is returned. |
The images below visualize the reverse
feature type hierarchy.
The following image shows a section of a typical map on which a user may click or add points for reverse geocoding.
The following image shows the same map with the available features for reverse geocoding highlighted: blue dots for Street
features, pink dots for POI centroids, green dots for Point
features, red lines for street segments, and a brown polygon representing a POI area feature.
In the following image, buffers have been created around the features based on the search tolerance values from the hierarchy table to illustrate the match types that would be returned for various reverse
input locations. Refer to the examples below to see the expected matches for the input locations in the image.
For each number callout in the image above, there is a corresponding example with the same number.
Example input location 1: Match to POI centroid returned
In this example, which corresponds to callout 1 in the image above, the input location is within the search tolerance of both POI and PointAddress features, but a match to the POI centroid is returned because it has a higher priority.
Request URL
https://[myServerURL]/arcgis/rest/services/[myGeocodeServiceName]/GeocodeServer/reverseGeocode?f=pjson&featureTypes=&location=-117.205416,34.038074
JSON Response
{
"address": {
"Match_addr": "Premier ENT",
"LongLabel": "Premier ENT, 255 Terracina Blvd, Redlands, CA, 92373, USA",
"ShortLabel": "Premier ENT",
"Addr_type": "POI",
"Type": "Doctor",
"PlaceName": "Premier ENT",
"AddNum": "255",
"Address": "255 Terracina Blvd",
"Block": "",
"Sector": "",
"Neighborhood": "",
"District": "",
"City": "Redlands",
"MetroArea": "",
"Subregion": "San Bernardino County",
"Region": "California",
"Territory": "",
"Postal": "92373",
"PostalExt": "",
"CountryCode": "USA"
},
"location": {
"x": -117.20541599999996,
"y": 34.038074000000051,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}
}
Example input location 2: Match to POI area returned
In this example, which corresponds to callout 2 in the image above, the input location is within a POI area feature, so a POI match is returned.
Request URL
https://[myServerURL]/arcgis/rest/services/[myGeocodeServiceName]/GeocodeServer/reverseGeocode?f=pjson&featureTypes=&location=-117.20744088954731,34.0375903447169
JSON Response
{
"address": {
"Match_addr": "Redlands Community Hospital",
"LongLabel": "Redlands Community Hospital, 350 Terracina Blvd, Redlands, CA, 92373, USA",
"ShortLabel": "Redlands Community Hospital",
"Addr_type": "POI",
"Type": "Hospital",
"PlaceName": "Redlands Community Hospital",
"AddNum": "350",
"Address": "350 Terracina Blvd",
"Block": "",
"Sector": "",
"Neighborhood": "Live Oak Canyon",
"District": "",
"City": "Redlands",
"MetroArea": "Inland Empire",
"Subregion": "San Bernardino County",
"Region": "California",
"Territory": "",
"Postal": "92373",
"PostalExt": "",
"CountryCode": "USA"
},
"location": {
"x": -117.20744088954731,
"y": 34.037590344716897,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}
}
Example input location 3: StreetAddress match returned
In this example, which corresponds to callout 3 in the image above, the input location intersects a POI area feature and a Street
buffer. A Street
match is returned since it has a higher priority than POI areas.
Request URL
https://[myServerURL]/arcgis/rest/services/[myGeocodeServiceName]/GeocodeServer/reverseGeocode?f=pjson&featureTypes=&location=-117.20700637168703,34.03582108290202
JSON Response
{
"address": {
"Match_addr": "1764-1792 W Fern Ave, Redlands, California, 92373",
"LongLabel": "1764-1792 W Fern Ave, Redlands, CA, 92373, USA",
"ShortLabel": "1764-1792 W Fern Ave",
"Addr_type": "StreetAddress",
"Type": "",
"PlaceName": "",
"AddNum": "1764",
"Address": "1764 W Fern Ave",
"Block": "",
"Sector": "",
"Neighborhood": "Live Oak Canyon",
"District": "",
"City": "Redlands",
"MetroArea": "Inland Empire",
"Subregion": "San Bernardino County",
"Region": "California",
"Territory": "",
"Postal": "92373",
"PostalExt": "",
"CountryCode": "USA"
},
"location": {
"x": -117.20692023528862,
"y": 34.03569657783153,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}
}
Example input location 4: PointAddress match returned
In this example, which corresponds to callout 4 in the image above, the input location is within the search tolerance of a Point
feature, so a Point
match is returned.
Request URL
https://[myServerURL]/arcgis/rest/services/[myGeocodeServiceName]/GeocodeServer/reverseGeocode?f=pjson&featureTypes=&location=-117.20689908332648,34.03431629224423
JSON Response
{
"address": {
"Match_addr": "421 San Timoteo Canyon Rd, Redlands, California, 92373",
"LongLabel": "421 San Timoteo Canyon Rd, Redlands, CA, 92373, USA",
"ShortLabel": "421 San Timoteo Canyon Rd",
"Addr_type": "PointAddress",
"Type": "",
"PlaceName": "",
"AddNum": "421",
"Address": "421 San Timoteo Canyon Rd",
"Block": "",
"Sector": "",
"Neighborhood": "",
"District": "",
"City": "Redlands",
"MetroArea": "",
"Subregion": "San Bernardino County",
"Region": "California",
"Territory": "",
"Postal": "92373",
"PostalExt": "7821",
"CountryCode": "USA"
},
"location": {
"x": -117.20737997312443,
"y": 34.034238985755593,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}
}
Example input location 5: Locality match returned
In this example, which corresponds to callout 5 in the image above, the input location is outside the tolerance of address and POI features, so the service returns a match to the smallest (by area) administrative or postal boundary feature that the location intersects. In this case, a match to the Live Oak Canyon neighborhood is returned.
Request URL
https://[myServerURL]/arcgis/rest/services/[myGeocodeServiceName]/GeocodeServer/reverseGeocode?f=pjson&featureTypes=&location=-117.205794,34.035115
JSON Response
{
"address": {
"Match_addr": "Live Oak Canyon, Redlands, California",
"LongLabel": "Live Oak Canyon, Redlands, CA, USA",
"ShortLabel": "Live Oak Canyon",
"Addr_type": "Locality",
"Type": "Neighborhood",
"PlaceName": "Live Oak Canyon",
"AddNum": "",
"Address": "",
"Block": "",
"Sector": "",
"Neighborhood": "Live Oak Canyon",
"District": "",
"City": "Redlands",
"MetroArea": "Inland Empire",
"Subregion": "San Bernardino County",
"Region": "California",
"Territory": "",
"Postal": "",
"PostalExt": "",
"CountryCode": "USA"
},
"location": {
"x": -117.205794,
"y": 34.035114999999998,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}
}
Example input location 6: StreetAddress match returned
In this example, which corresponds to callout 6 in the image above, the input location is within the tolerance of both Street
and Street
features. Even though Street
has a higher priority than Street
, a Street
match is returned. This is because intersection matches are only returned by reverse
if the request includes Street
. The feature
parameter is empty in this case.
Request URL
https://[myServerURL]/arcgis/rest/services/[myGeocodeServiceName]/GeocodeServer/reverseGeocode?f=pjson&featureTypes=&location=-117.203741,34.036609
JSON Response
{
"address": {
"Match_addr": "400-470 Terracina Blvd, Redlands, California, 92373",
"LongLabel": "400-470 Terracina Blvd, Redlands, CA, 92373, USA",
"ShortLabel": "400-470 Terracina Blvd",
"Addr_type": "StreetAddress",
"Type": "",
"PlaceName": "",
"AddNum": "402",
"Address": "402 Terracina Blvd",
"Block": "",
"Sector": "",
"Neighborhood": "Live Oak Canyon",
"District": "",
"City": "Redlands",
"MetroArea": "Inland Empire",
"Subregion": "San Bernardino County",
"Region": "California",
"Territory": "",
"Postal": "92373",
"PostalExt": "",
"CountryCode": "USA"
},
"location": {
"x": -117.20378869939896,
"y": 34.036582574473556,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}
}
Choose specific output features
Locators built with the Create Locator geoprocessing tool are configured to return the most relevant address or place for a given reverse
input location. However, as a developer of an application that uses reverse geocoding, you may want more control over reverse geocode results. For example, you may want users of your application to choose the features that are returned when they reverse geocode a location, or the search tolerances mentioned in the previous table aren't sufficient and you want more distant addresses to be returned. Maybe you want to return Street
matches. You can use the feature
parameter to satisfy such requirements by refining reverse geocoding results.
You can use the feature
parameter to specify one or more match types to be returned by a reverse
request. If one value is included for feature
, the search tolerance is extended to 500 meters. If the feature
parameter includes multiple values, the search tolerances defined in the feature types hierarchy table above are used. Details for the logic used by the feature
parameter are described below.
featureTypes match conditions
-
If
feature
is blank, the match is based on the default feature type hierarchy and search tolerances defined in the feature type hierarchy table, excludingTypes Street
.Int Street
matches are only returned ifInt Street
is included in theInt reverse
request.Geocode -
If
feature
includes a single value, a search tolerance of 500 meters is used and only the input feature type is searched for.Types - If the input feature type exists within 500 meters of the input location, a match to that feature is returned.
- If there are no matches to the input feature type within 500 meters of the input location, no match is returned for the
reverse
request.Geocode
-
If
feature
includes multiple values, the default search tolerances for the input feature types as defined in the feature type hierarchy table are used to determine the match.Types - If the input location is within the search tolerance of only one of the input feature types, a match to that feature type is retuned.
- If the input location is within the search tolerance of multiple input feature types, a match to the input feature type with the highest priority is returned.
- If the input location is not within the search tolerance of any of the input feature types, no match is returned.
featureTypes example 1: Reverse geocode an intersection
In this example, the feature
parameter is used to return a Street
match with a reverse
request.
Request URL
https://[myServerURL]/arcgis/rest/services/[myGeocodeServiceName]/GeocodeServer/reverseGeocode?f=pjson&featureTypes=StreetInt&location=-117.203741,34.036609
JSON Response
{
"address": {
"Match_addr": "W Fern Ave & Terracina Blvd, Redlands, California, 92373",
"LongLabel": "W Fern Ave & Terracina Blvd, Redlands, CA, 92373, USA",
"ShortLabel": "W Fern Ave & Terracina Blvd",
"Addr_type": "StreetInt",
"Type": "",
"PlaceName": "",
"AddNum": "",
"Address": "W Fern Ave & Terracina Blvd",
"Block": "",
"Sector": "",
"Neighborhood": "Live Oak Canyon",
"District": "",
"City": "Redlands",
"MetroArea": "Inland Empire",
"Subregion": "San Bernardino County",
"Region": "California",
"Territory": "",
"Postal": "92373",
"PostalExt": "",
"CountryCode": "USA"
},
"location": {
"x": -117.20373988021336,
"y": 34.036630049364923,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}
}
featureTypes example 2: Multiple input featureTypes values
A typical use case for the feature
parameter is to exclude matches to nonaddress features, which can be accomplished by setting feature
as Point
and Street
. In this example, the input location is within the search tolerance of both POI and Point
features, but a match to Point
is returned because feature
is used to exclude the POI match.
Request URL
https://[myServerURL]/arcgis/rest/services/World/GeocodeServer/reverseGeocode?f=pjson&featureTypes=PointAddress,StreetAddress&location=-117.205453,34.037988
JSON Response
{
"address": {
"Match_addr": "257 Terracina Blvd, Redlands, California, 92373",
"LongLabel": "257 Terracina Blvd, Redlands, CA, 92373, USA",
"ShortLabel": "257 Terracina Blvd",
"Addr_type": "PointAddress",
"Type": "",
"PlaceName": "",
"AddNum": "257",
"Address": "257 Terracina Blvd",
"Block": "",
"Sector": "",
"Neighborhood": "",
"District": "",
"City": "Redlands",
"MetroArea": "",
"Subregion": "San Bernardino County",
"Region": "California",
"Territory": "",
"Postal": "92373",
"PostalExt": "",
"CountryCode": "USA"
},
"location": {
"x": -117.20538197886449,
"y": 34.038152999262394,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}
}