[OSM-talk] Mysterious PostGIS Problem with Polygons

Peter Körner osm-lists at mazdermind.de
Fri Aug 21 17:51:58 BST 2009


>> The second should fetch the border of Germany and the first
>> one all boundaries in that. At least that's what I want it
>> to do :)
> 
> I just ran that query on my database and used name='Australia' and it works as you thought it should.

Yes, you're right. It works with
    Nederland, Australia, Italia

but not with
    Deutschland, Danmark, Polska


SELECT osm_id, admin_level, name
FROM planet_osm_polygon
WHERE ST_Within(way, (
   SELECT way
   FROM planet_osm_polygon
   WHERE boundary='administrative' AND
         name='Polska'
   LIMIT 1
))
AND boundary='administrative'
LIMIT 25


Any Idea Why?

Peter





More information about the talk mailing list