[postgis-users] Help with spatial query

storma-ipb at indo.net.id storma-ipb at indo.net.id
Wed Jan 7 01:55:15 PST 2009


Dear List,

Since the (planned) Postgis book is not yet available, I still
have to ask List for the following simple SQL.
I have two tables:

1) One table consist of 150 watershed polygons
2) Second table consista of 500 district polygons.

Some of the districts are completely whithin one certain
watershed (100%), but some has intersection with more than one
watershed. How I can write SQL to know percentage of district
intersection area  with  certain watershed (i.e. fraction of
intersected district area divided by area of one watershed). As
an output I will have 500 rows consiting name of district and
percentage of its area in certain watershed.
best regards,

surya



___________________________________________________________
indomail - Your everyday mail - http://indomail.indo.net.id





More information about the postgis-users mailing list