[postgis-users] Intersection of 2 large maps overlap at a corner

Kevin Neufeld kneufeld at refractions.net
Fri Oct 24 12:25:51 PDT 2008


You're query looks good.  Do you have GIST indexes on the geometries in 
both tables?

What is the result of EXPLAIN?

-- Kevin

Bob and Deb wrote:
> Hello All,
> 
> I'm new to postgis and need help with (what seems to be a simple) query. 
> 
> I have 2 geology maps that overlap at a corner:
> 
> ----------------------------
> |                          |
> |                          |
> |                 ---------|--------------
> |                 |        |             |
> ----------------------------            |
>                   |                     |
>                   -----------------------
> 
> Below is the query that I used to do the job, but it takes a long time 
> to finish.  Any suggestions on improving it?
> 
> Thanks in advance!
> 
> Bob
> 
> SELECT
>    ST_Intersection(GeoB.the_geom,GeoQ.the_geom) as intersect_geom,
>    GeoB.*,
>    GeoQ.*
> FROM
>    sj_100k_geopy as GeoB,
>    sf_quat_geopy as GeoQ
> WHERE
>    ST_Intersects(GeoB.the_geom,GeoQ.the_geom)
> AND
>    GeoB.ptype not in ('Qls','Qls?')
> AND
>    GeoQ.ptype not in ('br','br?')
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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