[OSM-dev] Defining the area of a country / What country is a LatLon in.

Andy Allan gravitystorm at gmail.com
Mon Nov 19 19:12:02 GMT 2007


I started a point-by-point reply to most of this, but here's a very
short summary instead.

http://artem.dev.openstreetmap.org/files/world_boundaries.tar.bz2 is big
http://wiki.openstreetmap.org/index.php/Osmxapi could be useful

Cheers,
Andy

On Nov 19, 2007 5:16 PM, Marcus Wolschon <Marcus at wolschon.biz> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Dear Robert, and Andy,
>
> Robert: why did you send a "I think we should" and "or something"
> only to me instead of the list? I cannot decide alone
> on such matters. Thus I'm asking for a consense on the list.
>
> Marcus
>
> >> How am I to
> >> a) get all border-pieces without downloading all of the planet.
>
> Andy wrote:
> >Best to download the planet, that way you'll get them all.
>
> Sorry, there is no space nor bandwidth to do this. This is
> not possible at all.
> I guess
> http://wiki.openstreetmap.org/index.php/OSM_Protocol_Version_0.5#Searching_for_Objects_by_Tag
> can be used here.
>
>
>
> >> b) interpret them (they may be incomplete e.g. in the baltic see).
> >>
> >> We have a defined tag "place=country;name=XXX" and it makes no
>
> Andy wrote:
> > Is this for nodes? In which case it's necessary, since it's the easy
> > leg up to putting a country on the map without needing an entire
> > border for it. We don't like high barriers to entry.
>
> No, as stated in the wiki place= is for nodes AND for areas.
> For nodes it clearly denotes the center, for areas it clearly
> denotes the polygon.
>
>
> Andy wrote:
> > a) Starting with the world_boundaries shapefiles, set up a mechanism
> > to detect which country a given point (or lat/long) is in
> > b) Then come up with a mechanism to use the boundaries in OSM, which
> > bears in mind that the shapefiles are inaccurate but complete, and the
> > OSM boundaries are (potentially) more accurate buy woefully incomplete
>
> Where do I get this "world_boundaries"-file, how big is it?
> It does not sound worth the effort instead of taking the borders
> in OSM and combining them in a machine-readable format.
>
> Robert wrote:
> > Most borders are between 2 countries, not just one. I think what we need
> > is to draw border ways between countries, and tag them just as
> > border=country or something,
>
> We are alread doing this as
> boundary=administrative and "right|country"=XXX and "right|country"=YYY.
> Thus there is no "we need to" and no "or something".
>
>
> > then have a relationship defining the
> > country with all it's sections of border and possibly a node near the
> > middle that represents where the country's name should be drawn.
>
> Okay. Please let us specify that relation.
> I think the center-point should be optional.
>
> * Are the related ways to be ordered or unordered?
> <relation id="???" name="border:country>
>  <member type="way" id="2" role="border_100"/>
>  <member type="way" id="???" role="border_200"/>
>  <member type="way" id="???" role="border_210"/>
>  <member type="way" id="???" role="border_300"/>
>  ...
> optional: <member type="node" id="111" role="centerPoint"/>
> </relation>
>
> <node id="111">
>  <tag key="place" value="country"/>
>  <tag key="name" value="Germany"/>
>  <tag key="right" value="country"/>
> </node>
>
> <way id="222">
>  <tag key="place" value="country"/>
>  <tag key="boundary" value="administrative"/>
>  <tag key="right|country" value="Germany"/>
> </way>
>
> * no consecutive numbers to allow later spliting/insertion of ways
>   without renaming everything
> * if the way and the relation disagree on the country-name, the
>   relation is used.
>
> Questions to the list:
>
> ? What algorithm should be applied to build the polygon of all
>   borders?
>
> ? How to detect and how to deal with incomplete=unclosed resulting
>   border-polygons?
>
> ? How to deal with illegal polygons (ways inserted 2 times,
>   unconsequtive ways, contained closed ways)?
>
> Using a simple closed polygon with "place"="country" and "name"="XYZ"
> does not have these problems but border-lines cannot be shared.
>
> Marcus
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHQcTTf1hPnk3Z0cQRApkWAJ9GvYimzuDmW42kLYuGM56jgnhqrwCeINHH
> o76KFfLGnwqTJ06mqAFbRqo=
> =qWWw
>
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
>




More information about the dev mailing list