GeoJSON Response

As part of the response, Naurt includes the important location data of the address inside a GeoJSON. GeoJSON is a well known standard used by many location applications, and is widely supported. You can read more about the GeoJSON specification here. You may plot GeoJSONs returned by Naurt effortlessly here.

Let's start by looking at a Naurt GeoJSON response in full, and then break down what you can find and where.

JSON
{
  "features": [
    {
      "geometry": {
        "coordinates": [-77.102551, -12.024541999999997],
        "type": "Point"
      },
      "properties": {
        "naurt_type": "basic_geocode"
      },
      "type": "Feature"
    },
    {
      "geometry": {
        "coordinates": [[-77.10255801027535, -12.024528611375205]],
        "type": "MultiPoint"
      },
      "properties": {
        "accuracy": {
          "quality": "medium"
        },
        "naurt_type": "naurt_door"
      },
      "type": "Feature"
    },
    {
      "geometry": {
        "coordinates": [
          [
            [-77.1025540175277, -12.024526820840904],
            [-77.10258807558888, -12.024453230562798],
            [-77.1027152901127, -12.0245102794879],
            [-77.1026812320839, -12.024583869776391],
            [-77.1025540175277, -12.024526820840904]
          ]
        ],
        "type": "Polygon"
      },
      "properties": {
        "contributors": ["© OpenStreetMap contributors"],
        "naurt_type": "naurt_building"
      },
      "type": "Feature"
    },
    {
      "geometry": {
        "coordinates": [
          [
            [-77.10258227640247, -12.024620760212755],
            [-77.10256614344613, -12.024652665278197],
            [-77.10244440085846, -12.024593777362014],
            [-77.1024605338148, -12.024561872289595],
            [-77.10258227640247, -12.024620760212755]
          ]
        ],
        "type": "Polygon"
      },
      "properties": {
        "accuracy": {
          "quality": "medium"
        },
        "minimum_parking_to_door_distance": 10.58,
        "naurt_type": "naurt_parking"
      },
      "type": "Feature"
    }
  ],
  "type": "FeatureCollection"
}

As you can see, there's a lot of information in one of these GeoJSONs! There are, however, essentially four main pieces of information you can find here

  • The door
  • The parking zone
  • The building outline (may or may not be present)
  • The basic geocode point

At a high level, we can see this is a FeatureCollection, which contains a list of features. Please note that there is no guarantee that the items in this list will be in a consistent order. So, if you want to parse out the coordinates, how would you do it? Let's look at each object in turn.

In very short, you can check the naurt_type tag in the properties object.

Basic Geocode

JSON
{
  "geometry": {
    "coordinates": [-77.102551, -12.024541999999997],
    "type": "Point"
  },
  "properties": {
    "naurt_type": "basic_geocode"
  },
  "type": "Feature"
}

The basic geocode point represents essentially what you would expect from any other geocoder. This isn't the primary use of Naurt - Naurt's value lies in its unique parking zones and door location information. However, this information might be useful to you in the case of transitioning from another geocoder to Naurt, you may use this to replicate the behaviour of your previous geocoder.

To identify this object, check the naurt_type in the properties object and checking for basic_geocode.

Notice how in the coordinates list there are just two numbers - and it is [longitude, latitude]. Be careful you do not accidentally swap longitude and latitude - longitude comes first here.

The Parking Zone

JSON
{
  "geometry": {
    "coordinates": [
      [
        [-77.10258227640247, -12.024620760212755],
        [-77.10256614344613, -12.024652665278197],
        [-77.10244440085846, -12.024593777362014],
        [-77.1024605338148, -12.024561872289595],
        [-77.10258227640247, -12.024620760212755]
      ]
    ],
    "type": "Polygon"
  },
  "properties": {
    "accuracy": {
      "quality": "medium"
    },
    "minimum_parking_to_door_distance": 10.58,
    "naurt_type": "naurt_parking"
  },
  "type": "Feature"
}

This represents a zone where parking can take place. The use case of this is to for example direct a delivery driver whilst still in a vehicle to a suitable place to park.

Whilst we take every effort to ensure parking zones are safe and legal, we can not guarantee this in every single instance. Drivers must ultimately obey local traffic laws and ensure their own and other's safety.

To identify this object, check the naurt_type in the properties object and checking for naurt_parking.

You will notice the type is Polygon - this means this is a shape, not a single point in space.

Also worth mentioning is the minimum_parking_to_door_distance which can be found in the properties object. This represents the distance from the parking zone to the door, specifically, as the name implies, the absolute minimum distance between them.

Notice how in the coordinates list there are just two numbers - and it is [longitude, latitude]. Be careful you do not accidentally swap longitude and latitude - longitude comes first here.

The Door

JSON
{
  "geometry": {
    "coordinates": [[-77.10255801027535, -12.024528611375205]],
    "type": "MultiPoint"
  },
  "properties": {
    "accuracy": {
      "quality": "medium"
    },
    "naurt_type": "naurt_door"
  },
  "type": "Feature"
}

This object represents the door location. The use case for this data is, for example, to direct a delivery driver to a door after they have parked in the above parking zone i.e. during the walking phase of the delivery.

Notice how the type of this object is MultiPoint. This means there could, in principle, be multiple doors. Thus, the data itself is found in a list of lists.

To identify this object, check the naurt_type in the properties object and checking for naurt_door.

Notice how in the coordinates list there are just two numbers - and it is [longitude, latitude]. Be careful you do not accidentally swap longitude and latitude - longitude comes first here.

The Building Outline

JSON
{
  "geometry": {
    "coordinates": [
      [
        [-77.1025540175277, -12.024526820840904],
        [-77.10258807558888, -12.024453230562798],
        [-77.1027152901127, -12.0245102794879],
        [-77.1026812320839, -12.024583869776391],
        [-77.1025540175277, -12.024526820840904]
      ]
    ],
    "type": "Polygon"
  },
  "properties": {
    "contributors": ["© OpenStreetMap contributors"],
    "naurt_type": "naurt_building"
  },
  "type": "Feature"
}

This object represents the outline of the building corresponding to the address. This object is not guaranteed to be present - Naurt does not always have building outline data. Thus, you should not depend on its existence.

To identify this object, check the naurt_type in the properties object and checking for naurt_building.

Notice how in the coordinates list there are just two numbers - and it is [longitude, latitude]. Be careful you do not accidentally swap longitude and latitude - longitude comes first here.

Accuracy

Within the properties of the GeoJSON response, each Naurt parking spot and building entrance is tagged with an accuracy. Naurt currently supports three classifications: high, medium, or low.

AccuracyDescription
highEntrance(s) is guaranteed to be on building perimeter and known to high accuracy.
mediumEntrance(s) detected near building perimeter and position adjusted accordingly.
lowEntrance detection of low quality with possible fallback to standard address based geocode.