Geocoding
Geocoding is the process of encoding an address into a latitude & longitude coordinate. With Naurt, this takes on a slightly different form. Instead of responding with a single coordinate, Naurt will respond with a GeoJSON containing the building's entrances, parking zones, and outline.
Requests
All requests should be sent to Naurt's final-destination endpoint.
https://api.naurt.net/final-destination/v1
Addresses
The simplest way to request Naurt data is via an address.
A POST
request should be sent to the final-destination endpoint containing a JSON with the address that is to be searched.
{
"address_string": "The Martha Gunn, 100 Upper Lewes Road, Brighton & Hove, United Kingdom, BN2 3FE",
"country": "UK"
}
- UK: United Kingdom
- SG: Singapore
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 '{"address_string":"The Martha Gunn, 100 Upper Lewes Road, Brighton & Hove, United Kingdom, BN2 3FE", "country": "UK"}' \
'https://api.naurt.net/final-destination/v1'
Address and Location
If there are multiple similar addresses to the one you are searching, it might
be useful to limit your search to a smaller area. For this, Naurt also allows
you to specify a latitude
& longitude
, and optionally a distance_filter
which defaults to 5000 metres. When used, only results within that distance of the provided position will be returned.
The distance_filter
should always be specified in metres. It has a maximum value
of 25,000 metres, a minimum value of 0 metres, and a default value of 5000 metres which applies even if this parameter is not provided.
{
"address_string": "The Martha Gunn, 100 Upper Lewes Road, Brighton & Hove, United Kingdom, BN2 3FE",
"latitude": 50.8353,
"longitude": -0.1277,
"distance_filter": 100,
"country": "UK"
}
curl -X POST \
-H 'Content-type: application/json' \
-H 'Authorization: <API-KEY-HERE>' \
-d '{"address_string":"The Martha Gunn, 100 Upper Lewes Road, Brighton & Hove, United Kingdom, BN2 3FE", "latitude": 50.8353, "longitude": -0.1277, "distance_filter": 100, "country": "UK"}' \
'https://api.naurt.net/final-destination/v1'
Responses
Within each response, Naurt provides a best_match
to the requested address. As you'd expect, this is what Naurt believes to be the most relevant address for your request. However, by setting additional_matches: true
in the body of your request, you can receive up to 4 additional matches which are relevant.
For each match Naurt provides the address and a GeoJSON containing the building entrances, parking zone, and building outline. Building entrances are type MultiPoint
, and parking zones and building outlines are type Polygon
,
An example response can be seen below plotted and as the GeoJSON response.
curl -X POST \
-H 'Content-type: application/json' \
-H 'Authorization: <API-KEY-HERE>' \
-d '{"address_string":"The Martha Gunn, 100 Upper Lewes Road, Brighton & Hove, United Kingdom, BN2 3FE", "country": "UK"}' \
'https://api.naurt.net/final-destination/v1'