[postgis-users] retrieving overlapping geometries ???

Paul Ramsey pramsey at cleverelephant.ca
Sat May 16 13:22:04 PDT 2009


Leaving aside that's kind of an ugly data model and you might consider
putting everything into one table:

select foo,bar from texas where st_intersects(the_geom, 'POLYGON()')
union
select foo,bar from virginia where st_intersects(the_geom, 'POLYGON()')

P

On Sat, May 16, 2009 at 7:23 AM, Smith Roman <autisi at yahoo.com> wrote:
> Hi,
> My database has street maps of different states. Each state is represented
> by a table. How can i fetch the map of an area (assuming I have the bbox of
> the area) whose geometries overlap two or more states (tables) .
> How would the SQL query be written ?
> Smith.
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>



More information about the postgis-users mailing list