[postgis-users] Stuck: Table within a table?

Steve Benzo steve_benzo at yahoo.com
Thu Sep 21 13:58:17 PDT 2006


Hi,

In a particular Postgis/postgres database, I have
several  geographic tables, countya, countyb, etc. I
would like to have a way to feed the within or contain
function a state's extent to find out which counties
are within a particular state. I've tried a few
iterations of queries without any luck, and so I was
hoping someone could point me in the right direction,
as far as the base SQL postgis statement to allow me
to accomplish this.

So far, I was thinking I could loop through the each
of the tables, use the within command with the state's
extent and the county's extent, and see if it returns
true. The problem I'm having is, like I mentioned,
getting this SQL statement together.

Many thanks

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the postgis-users mailing list