Reverse Geocoding
Reverse geocoding is the process of finding addresses near a latitude & longitude. Naurt provides this functionality, but once again returns GeoJSON parking zones, building entrances, and building outlines.
Requests
All requests should be sent to Naurt's final-destination endpoint.
https://api.naurt.net/final-destination/v1
A POST
request should be sent to the final-destination API containing a JSON with the latitude & longitude in WGS84 degrees.
{
"latitude": 50.835551,
"longitude": -0.127613
}
Don't forget to include the API key in the Authorization
header.
curl -X POST \
-H 'Content-type: application/json' \
-H 'Authorization: <API-KEY-HERE>' \
-d '{"latitude": 50.835551, "longitude": -0.127613, "country": "UK"}' \
'https://api.naurt.net/final-destination/v1'
Responses
As with geocoding, Naurt provides a best_match
which in this case is the closest address to the given coordinates. If additional_matches: true
has been provided in the request, the next 4 closest addresses will also be returned. For each Address, the standard Naurt building entrance, parking zone, and building outline will be present in GeoJSON form.
An example response can be seen below with the GeoJSON plotted on a map.
curl -X POST \
-H 'Content-type: application/json' \
-H 'Authorization: <API-KEY-HERE>' \
-d '{"latitude": 50.835551, "longitude": -0.127613, "country": "UK"}' \
'https://api.naurt.net/final-destination/v1'