On Friday 27 March 2009 15:57, Andy Deakin wrote: > Hi, > > I am looking for a simple answer to the question 'what country is > lat+long in?', and for this I need the country borders as polygons.
For the technical part, I had extremely good and fast (~0.1s) result with one single postgres/postGIS query : 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 osm_id | name | admin_level --------+--------------+------------- -7407 | Haute-Savoie | 6 -8655 | Rhône-Alpes | 4 -74368 | Cusy | 8 (3 rows) > From [1] I see that I am not the only one. ;-) Forgot all about this > Has there been any progress > made with this? About what ? The first step might be to feed the osm db : without boundaries, we've got nothing. (see type=boundary or type=multipolygon) In that part, I stumbed into the terrible truth : country boundaries are big, france as a full relation export (with all ways and nodes) is ~30Mo osm data, containing over 1800 members (thanks to our howfully numerous admin_level=8 admin division) Still searching for solutions in the form of super-relation or else... For the second step, I saw Marcus linked in the page you mentionned to country specific speed limit and access restrictions. From there I think we can either convert that in machine readable form and either tell all router planners to make the good choice in absence of evidence OR construct a post osm data feeder that will make those country specific things explicit. -- sly Sylvain Letuffe li...@letuffe.org qui suis-je : http://slyserv.dyndns.org _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev