Hello, I would like to download the coordinates of all parks in my region. From what I can tell I need to find all nodes that are tagged with "leisure"->"park". The only way I can tell to do this is by using the API to parse through the xml of every single node in my region. For example, I am doing the following:
My plan is to do the above over 60,000 times, which is quite resource intensive. Is there a better way to find all nodes of a certain tag in a certain region? Thanks, James asked 16 Aug '11, 05:09 jamesmcb |
If you do not want to hammer the API servers you can also download the raw OSM data of your desired area via the sources listed at Planet.osm . I would recommend geofabrik.de or cloudmade.com Process that data with Osmosis or Osmfilter which seems to be a bit easier to handle IMHO. answered 16 Aug '11, 16:20 stephan75 |
The answer is a call like this: http://www.overpass-api.de/api/xapi?node[leisure=park][bbox=-123.076,37.059,-121.436,38.529] Unfortunately xapi.openstreetmap.org is down right now and in my previous queries I was spelling leisure incorrectly. answered 16 Aug '11, 06:34 jamesmcb 1
There is more than one XAPI server, take a look at the XAPI wiki page. The XAPI server by mapquest is said to be working well and there is also the JXAPI.
(16 Aug '11, 07:13)
scai ♦
|
XAPI request is probably the easiest solution for that but unfortunatelly, XAPI servers are often out-of-service. [1] http://wiki.openstreetmap.org/wiki/Planet#Mirrors (in particular, check Geofabrik or Cloudmade producing smaller daily extracts by state, region or country) answered 16 Aug '11, 10:11 Pieren Mapquest Open also has a XAPI running against OSM data, and it's up reliably, and has a GUI.
(16 Aug '11, 22:42)
Baloo Uriza
|
I looked into this a little farther and found some documentation on the XAPI to run a command like this:
http://xapi.openstreetmap.org/api/0.6/node[lesiure=park][bbox=-122.27323,37.8395,-122.25428,37.85097] http://xapi.openstreetmap.org/api/0.6/way[lesiure=park][bbox=-122.27323,37.8395,-122.25428,37.85097]
But nothing appeared :-(
If you look at this call to the normal api:
http://openstreetmap.org/api/0.6/map?bbox=-122.27323,37.8395,-122.25428,37.85097
You will see that there is at least 1 node and 1 way. I am definitely getting closer.