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.

POST
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.

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, "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.


Request
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'
Response
{
  "best_match": {
    "address": "The Martha Gunn, 100, Upper Lewes Road, Brighton, East Sussex, England, United Kingdom, BN2 3FE",
    "distance": 5.260556653912183,
    "geojson": {
      "features": [
        {
          "geometry": {
            "coordinates": [
              [
                -0.127653,
                50.835511
              ]
            ],
            "type": "MultiPoint"
          },
          "properties": {
            "accuracy": {
              "quality": "high"
            },
            "naurt_type": "naurt_door"
          },
          "type": "Feature"
        },
        {
          "geometry": {
            "coordinates": [
              [
                [
                  -0.127597,
                  50.835464
                ],
                [
                  -0.12773,
                  50.8354
                ],
                [
                  -0.127757,
                  50.835423
                ],
                [
                  -0.127775,
                  50.835415
                ],
                [
                  -0.12786,
                  50.835484
                ],
                [
                  -0.127709,
                  50.835556
                ],
                [
                  -0.127597,
                  50.835464
                ]
              ]
            ],
            "type": "Polygon"
          },
          "properties": {
            "naurt_type": "naurt_building",
            "contributors": [
              "© OpenStreetMap contributors"
            ]
          },
          "type": "Feature"
        },
        {
          "geometry": {
            "coordinates": [
              [
                [
                  -0.12752,
                  50.83547
                ],
                [
                  -0.127566,
                  50.835447
                ],
                [
                  -0.127697,
                  50.835555
                ],
                [
                  -0.127652,
                  50.835577
                ],
                [
                  -0.12752,
                  50.83547
                ]
              ]
            ],
            "type": "Polygon"
          },
          "properties": {
            "accuracy": {
              "quality": "high"
            },
            "naurt_type": "naurt_parking"
          },
          "type": "Feature"
        }
      ],
      "type": "FeatureCollection"
    },
    "id": "3b32df10-4fd2-cc33-a3c6-3e4bd657e8ec"
  },
  "version": "1.3.0",
  "request_id": "47cdd308-39c8-4ff4-a982-8f6782ca51ab"
}
Table of Contents