[OSM-talk] Weather overlay
Peter Körner
osm-lists at mazdermind.de
Fri Aug 21 16:59:43 BST 2009
John Smith schrieb:
> --- On Sat, 22/8/09, Peter Körner <osm-lists at mazdermind.de> wrote:
>
>> Any :) I'm just getting started. I tried to find any
>> boundaries in a given Area, in this case in Germany.
>
> Leave admin_level= out of the query
>
Thank you for the hint :)
Please take a look at my query, again:
SELECT osm_id, name
FROM planet_osm_polygon
WHERE boundary='administrative' AND
ST_Within(way, (SELECT way FROM planet_osm_polygon WHERE
boundary='administrative' AND admin_level='2' AND name='Deutschland'
LIMIT 1) )
These are two seperate queries:
SELECT osm_id, name
FROM planet_osm_polygon
WHERE boundary='administrative' AND
ST_Within(way, ... )
and
SELECT way FROM planet_osm_polygon WHERE
boundary='administrative' AND admin_level='2' AND
name='Deutschland' LIMIT 1
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 :)
Peter
More information about the talk
mailing list