[OSM-dev] What country is something in?
roland.olbricht at gmx.de
Thu Oct 30 22:12:38 GMT 2008
> I could add it to my routing-software
> in no time and make use of it for maxspeed and driving on the
> left or the right side of the road (think "turnabout ahead, second
I'm sorry, at the moment the project is still rather a proof-of-concept.
Currently, only 16 countries are correctly shaped, most of them in Europe and
almost all without a coastline. A sound solution for the coastline might take
one or two weeks. But for a large share of countries, there are simply still
to much gaps in the boundary.
I would expect that getting Europe to work will take about two weeks, the rest
of the world ever longer. It would be a good idea to encourage other mappers
in fixing the gaps but I haven't any idea yet how to do so.
> I haven't tried it yet but had a brief look.
> Is it possible to have the name of the country in the filename of
> the ".border"-file?
Done. The filenames will be equal to the tag with key "name" in the respective
> [...] it would be trivial to add an option to output
> the border as a way in OSM-XML -format instead?
This is a little bit more delicate. I have added a OSM-alike XML-syntax, I
hope that it is useful. It consists of
* Ways where any way is closed. These ways are entire components instead of
being part of the OSM database.
* The nodes aren't added as explicit elements, but each <nd>-element carries
lat(itude) and lon(gitude) of its respective node. I hope this would simplify
* Countries may have holes (for an extreme example see
). There doesn't seem to be any tag appropriate for tagging holes. So I have
added a new tag with k="type" v="exclave" for those components which need to
be cut out from other components.
* Not all nodes used in the polygon do exist as nodes in the OSM database. For
example, all nodes with a name "intersection-" are derived from intersections
of ways without node.
* The ways given here aren't ways from the OSM database. It happens quite
frequently that a way is the border of more than two countries, for example
because of a unmarked intersection with another way or just by passing a
point where three countries meet.
More information about the dev