Within the Addressing API, the Reverse Service performs reverse geocoding using input coordinates and returns address information that is the best match for that point.
The Input request consist of
addresses
and
preferences
:
Parameter | Description | Example Value |
---|---|---|
preferences | Options supported by the Address Geocode Service which includes a variety of settings for match mode, geocode type, candidates returned, fallbacks, offsets, match address elements, ranges information and more. |
|
addresses | List of addresses to be processed. |
Requested address, based on the country's addressing standard. Single-line request: "10 downing street london SW1A 2AA" Multi-line request: "10 DOWNING STREET", "LONDON, SW1A 2AA" |
Request
{
"preferences": {
"maxResults": 1,
"returnAllInfo": true,
"factoryDescription": {
"label": "",
"featureSpecific": {}
},
"clientLocale": "",
"clientCoordSysName": "",
"distance": {
"value": 150,
"distanceUnit": "METER"
},
"streetOffset": {
"value": 7,
"distanceUnit": "METER"
},
"cornerOffset": {
"value": 7,
"distanceUnit": "METER"
},
"fallbackToGeographic": false,
"fallbackToPostal": false,
"matchMode": "",
"returnOfAdditionalFields": false,
"originXY": [],
"customPreferences": {}
},
"locations": [
{
"addressId": "1",
"longitude": -73.704719,
"latitude": 42.682251,
"country": "USA"
}
]
}
You can try this in the Geo Addressing SDK Sample application
(http://{server}:{port}/{context}/):
- Click .
- Enter a Latitude (y) and Longitude (x).
- Click Submit and view the response.
{ "responses": [ { "status": "OK", "results": [ { "score": 0, "address": { "formattedAddress": "3 impasse des Romarins, 13113 Lamanon, France", "formattedStreetAddress": "3 impasse des Romarins", "formattedLocationAddress": "13113 Lamanon", "addressNumber": "3", "country": { "name": "France", "isoAlpha2Code": "FR", "isoAlpha3Code": "FRA", "isoNumericCode": "250" }, "admin1": { "longName": "Provence-Alpes-Côte d'Azur", "shortName": "Provence-Alpes-Côte d'Azur" }, "admin2": { "longName": "Bouches-du-Rhône", "shortName": "Bouches-du-Rhône" }, "city": { "longName": "Lamanon", "shortName": "Lamanon" }, "postalCode": "13113", "street": "des Romarins" }, "addressLines": [ "3 impasse des Romarins", "13113 Lamanon", "France" ], "location": { "explanation": { "type": "ADDRESS_POINT" }, "feature": { "type": "Feature", "properties": { "crsName": "epsg:4326" }, "geometry": { "type": "Point", "coordinates": [ 0.00005, 0.00039 ] } } }, "explanation": { "addressMatch": {}, "source": { "label": "ggs" } }, "customFields": { "MAIN_ADDRESS": "des Romarins", "LANGUAGE": "fr", "SEGMENT_ID": "e0c25a7497cc47bba075dedf834dc575", "REVERSE_GEOCODE_DISTANCE": "43.721000000000004", "REVERSE_GEOCODE_DISTANCE_UNIT": "METERS", "RESULT_CODE": "RS8A", "PRECISION_CODE": "RS8A", "PRE_THOROUGHFARE_TYPE": "impasse", "THOROUGHFARE_TYPE": "impasse", "STREETDATATYPE": "15" }, "parsed": [ {} ] } ] } ] }