This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

getting hospitals close to coordinates: use Nominatim or Overpass API (<500 queries/d)?

0

I've been reading about using openstreetmap to get hospitals near GPS coordinates but I have become a little confused. It looks like there is the Nominatim and the Overpass API. I'm not sure which one I should be using.

Right now I am doing about 100 queries a day, the most I expect in a day is 500.

Should I be using Nominatim or Overpass API for my task?

asked 29 Jul '18, 09:33

Dave4784's gravatar image

Dave4784
16445
accept rate: 0%

edited 29 Jul '18, 21:38

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


2 Answers:

2

Both may suit your task, it really depends what type of information you want.

Nominatim returns an object with a hierarchy of location information; Overpass will give you the basic OSM objects as they are tagged.

Both are volunteer maintained services run on OSMF or other non-profit servers, so you should make no assumptions about likely service levels. Availability for uses such as yours entirely depends on whether servers are overloaded or not.

Note that around 150k objects have been mapped as hospitals on OSM, but many of these, particularly in poorer parts of the world, may be other health care facilties (clinics, general practices etc) rather than hospitals with in-patient facilities, and specialist surgeons and physicians.

answered 29 Jul '18, 12:08

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

0

hi there

by the way iin openstreetmap-solutions it is like so:

  • to construct a query, that helps to get "hospitals" which is a special phrase according to this link

Here's an example Overpass-API query that returns hospitals within a 10 Km radius of that location.

[out:json][timeout:25];
nwr(around:10000,40.40,-79.93)["amenity"="hospital"];
out center;

answered 29 Oct '20, 14:29

tagtheworld's gravatar image

tagtheworld
0889
accept rate: 0%

Source code available on GitHub .