Tagging Country Borders
|Software described on this page or in this section is unlikely to be compatible with API v0.6 deployed on April 20, 2009. If you have fixed the software, or concluded that this notice does not apply, remove it.|
Currently there are multiple ways defined how a county-border is to be tagged.
- A polygon tagged "place=country" and name=* - this is documented but not actually used
- the relation type boundary associating all ways making the polygon. boundary=administrative with :
See boundary=* and associated discussion.
See OSM Inspector/Views/Boundaries about a map showing OSM boundaries on a map.
searching by country
Currently User:MarcusWolschon is working on some java-code to download these borders, sort them, merge them into polygons and provide code for defining
- is a lat+lon contained in country X?
- What country is a lat+lon in?
Once these are usable, some propose that we have Country_specific_default_values.
getting all borders
wget "http://www.informationfreeway.org/api/0.5/relation[boundary=administrative]" -O nation_border_relations.osm
and the ways via:
wget "http://www.informationfreeway.org/api/0.5/way[border_type=nation]" -O nation_borders1of2.osm
wget "http://www.informationfreeway.org/api/0.5/way[admin_level=2]" -O nation_borders2of2.osm