Overpass API: Is it possible to select polygon and get geographical data? Thanks in advance! I want to select polygon and get geographical data of polygon's edges, like polyline. asked 15 Aug '13, 14:59 AnkaAnica |
Do you mean you want to download all data inside a non-rectangular polygon? That is explained on http://wiki.openstreetmap.org/wiki/Overpass_API/Language_Guide#Select_Region_by_Polygon .
Note that you need some kind of recurse magic to also get ways and relations. To get bounding box coordinates by selecting from a map use http://osm.duschmarke.de/bbox.html (german; you need to hold down ctrl and then click and drag the bbox, the coordinates will be displayed in the bottom text fields). answered 15 Aug '13, 15:08 gormo 2
To download by country, use area[name="Belgium"];( node(area); <;);out meta;. The precise name can be tricky, but you can open [the popup UI][1], click somewhere in your country and search on the last pages of the popup for an entry with "Country Boundary". That gives you the OSM name of your country to use in the above query.
(16 Aug '13, 07:13)
Roland Olbricht
Thank you very much! Just one question more...can I select or entry name of provice?
(16 Aug '13, 12:34)
AnkaAnica
|
answered 15 Aug '13, 17:15 stephan75 Can I do it by selecting name of country and how?
(15 Aug '13, 17:24)
AnkaAnica
3
If you are looking for country outlines, go to www.naturalearthdata.com and download their "admin0" data set.
(15 Aug '13, 18:25)
Frederik Ramm ♦
If you want to do the mentioned query via overpassapi limited by the outline of a country, go to http://nominatim.openstreetmap.org and enter the countries name ... examine the results carefully and find the right relation within the raw OSM data. Then you can decide to use the relation ID number that you can use by adding the mentioned offset, or type the name of the "area" that you have found. But be sure to use the right name, and that the name is unique in the OSM database.
(19 Aug '13, 16:49)
stephan75
|