[OSM-dev] country boundary polygons

Roland Olbricht roland.olbricht at gmx.de
Sat Mar 28 00:46:21 GMT 2009


> > I am looking for a simple answer to the question 'what country is
> > lat+long in?',
> >  Has there been any progress
> > made with this?

Yes, I'm working on a server side scripting host for OSM data. This includes a 
reverse gazetteer as a sample application. The gazetteer works fine, but the 
more down-to-earth-things like updating the database without a complete data 
reload aren't yet working stable. So I think, the system will be available 
about mid-May.

> echo "select osm_id,name,admin_level from planet_osm_polygon where way &&
> transform('SRID=4030;POINT(6.0333 45.7666)',900913) and
> _ST_Contains(way,transform('SRID=4030;POINT(6.0333 45.7666)',900913));" |
> psql gis

If you have an instance of PostGIS running anyway, this is a good solution.

> and for this I need the country borders as polygons.

You may want to have a look at
http://wmaz.math.uni-wuppertal.de/olbricht/osm/

I abandoned to simply produce the country polygons that way because, as Sly 
has mentioned, the country borders still are of rather poor quality. There 
are roughly 17 countries out of 200 for which the boundaries will constitute 
complete polygons. That's the reason why we should have a more advanced 
system for error detection (the script server will contribute to this).

By contrast, the local borders from imported data ("Kreisgrenzen" in Germany 
and similar import in France and Italy) are quite complete and consistent.

Cheers,

Roland




More information about the dev mailing list