Take the 2-minute tour ×

Given a latitude/longitude combination as well as a radius from that point (in km, if it makes a difference), does anybody know of a service/API (or even download) that I can use to obtain a list of all the places, streets etc. from within the circle originating from the latitude/longitude supplied? When I say all the places, I am interested in everything - from bodies of water to schools.

Many thanks for any assistance, it's greatly appreciated. :)

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted

There's OSMAXPI, a web service protocol which enables some of the things you're looking for. There are several problems in your case:

  1. There's a way to query OSM data based on a bounding box (so not a circular area defined by a radius).
  2. There is a limit of how large the area is and how much data you can fetch with a single query.

The alternative is to download Planet OSM file and set up your own database and API serving, but this requires a lot of HW resources, since the database is quite large and growing daily.

Also take a look at some other related QA:

share|improve this answer
Many thanks for your reply, Igor. I've had a look at the Planet OSM file - and whilst this is indeed very large, I only need UK data - so will probably give option 2 a go for now, with a reduced data set. Appreciate your help :) –  Bob_94 Aug 22 '11 at 16:41
If you only need UK data, there are UK-only OSM extracts provided by CloudMade: downloads.cloudmade.com/europe/northern_europe/… –  Igor Brejc Aug 23 '11 at 4:12
add comment

There is an API provided by some people called Overpass which allows you to submit arbitrarily complex queries and get just the data you need. If you want absolutely everything in or overlapping a certain bounding box, these runes work for me (substitute your own bounding box; sorry, it's not a circle but a rectangle in degrees). Use them in the query form at http://www.overpass-api.de/query_form.html.

<osm-script timeout="10000" element-limit="1073741824">
  <union into="_">
    <bbox-query into="_" s="52.3170669250001" n="52.4027433480001" w="4.80527567900009" e="4.97793537400008"/>
    <recurse from="_" into="_" type="up"/>
    <recurse from="_" into="_" type="down"/>
  <print from="_" limit="" mode="meta" order="id"/>

If you want a subset of data, look at the examples here: http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide. Warning: it's far too complicated for me to understand. Best of luck!

share|improve this answer
add comment

Your Answer


