Select Page

Using Nominatim

2 minute read

ScaleUp! Community, previously we wrote about geolocation, geofences and how to acquire locations for your app. This article will focus on getting locations (longitudes, latitudes) programmatically, using the Nominatim service, provided by OpenStreetMap

What is Geocoding

The process of converting a place name (eg. Mass General Hospital) or a street address into a longitude and latitude is called geocoding. Geocoding is required because place-specific mobile apps understand places by their longitude and latitude, not by name or street address. If you want to build logic into your app for when users are near, for example a hospital, you must convert from the name of the hospital, or its address to its longitude and latitude.

How to Compile the Names or Addresses for Places of Interest

Before you can perform geocoding, you must create a list of place names and/or addresses, which are important for your application. Examples of these would be: Hospitals; SNFs; LTACs; Clinical trial sites; Outpatient treatment clinics; Dialysis centers; Infusion centers; Urgent care facilities; Pharmacies; Grocery stores; etc

This information can be obtained from many sources – often there are free databases or lists of them. In general, street addresses for places are most useful. Having both street addresses and place names is doubly useful because you can run geocoding queries for both separately and compare the results, to give you more precise information.

Below is a snippet of a compiled list of hospitals in the US. Notice that each row has an ID. This ID should be unique across all the rows in your list of places. The ID should also be stable – meaning that a given place should not change its ID over time. That is important because you will not geocode only one time. Instead, you will geocode once initially for all of your places, then you will periodically geocode your whole list, to find places that have relocated. In order for you to be able to compare locations of your places across multiple geocodings, you must have stable place identifiers.

Up next

Performing geocoding

Twitter

LinkedIn