Reverse Geocoding

Reverse geocoding is the process of finding addresses near an inputted latitude & longitude coordinate. Naurt provides this functionality, but once again returns GeoJSON parking spot and building entrance data for each address.

Requests

All requests should be sent to Naurt's point of interest (POI) endpoint.

POST
https://api.naurt.net/poi/v3

A POST request should be sent to the POI endpoint containing a JSON with the latitude & longitude in WGS84 degrees.

JSON
{
  "latitude": 50.835551, 
  "longitude": -0.127613
}

Don't forget to include the API key in the Authorization header.

curl
curl -X POST \
-H 'Content-type: application/json' \
-H 'Authorization: <API-KEY-HERE>' \
-d '{"latitude": 50.835551, "longitude": -0.127613}' \
'https://api.naurt.net/poi/v3'

Responses

As with geocoding, Naurt responses contain two fields: best_match and additional_matches. The best match will contain the closest address Naurt has to the provided location. Additional matches, which are not enabled by default, will contain the 20 closest addresses. For each Address, the standard Naurt building entrance and parking zone GeoJSON will be present.

An example response can be seen below both plotted and in GeoJSON form.


Request
curl -X POST \
-H 'Content-type: application/json' \
-H 'Authorization: <API-KEY-HERE>' \
-d '{"latitude": 50.835551, "longitude": -0.127613}' \
'https://api.naurt.net/poi/v3'
Response
{
    "best_match": {
        "address": {
            "city": "brighton & hove",
            "country": "united kingdom",
            "county": "",
            "house_name": "",
            "postalcode": "bn2 3fe",
            "state": "",
            "street": "upper lewes road",
            "street_number": "100",
            "unit": ""
        },
        "contributors": ["© OpenStreetMap contributors"],
        "distance": 5.3139822635125995,
        "geojson": {
            "features": [{
                "geometry": {
                    "coordinates": [-0.1276533875362692, 50.83551065511638],
                    "type": "Point"
                },
                "properties": {
                    "number_of_visits": 0
                },
                "type": "Feature"
            }, {
                "geometry": {
                    "coordinates": [
                        [
                            [-0.127519890234697, 50.83546952769126],
                            [-0.12756553081486807, 50.835447244964186],
                            [-0.1276972076858581, 50.83555481857893],
                            [-0.12765156706335587, 50.83557710135735],
                            [-0.127519890234697, 50.83546952769126]
                        ]
                    ],
                    "type": "Polygon"
                },
                "properties": {
                    "number_of_visits": 0
                },
                "type": "Feature"
            }],
            "type": "FeatureCollection"
        },
        "latitude": 50.83551065511638,
        "longitude": -0.1276533875362692,
        "poi_id": "745d3e71-079c-4a08-a988-f973669a33be",
        "poi_type": "naurt_destination"
    },
    "additional_matches": null,
}
Table of Contents