Tagging Country Borders
Jump to navigation
Jump to search
current state
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 :border_type=country
- not often usedadmin_level=2
- most used- it is also possible to add
right:country=*
andleft:country=*
. - often missing
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
and
wget "http://www.informationfreeway.org/api/0.5/way[admin_level=2]" -O nation_borders2of2.osm