[postgis-devel] Non-Join Join

Martin Davis mbdavis at refractions.net
Fri Jul 18 14:20:44 PDT 2008


Since you're trying to find all As which are *further* than a given 
distance from Bs, I don't think there is any "efficient" way.

I think you pretty much have to do a self-join with a where condition 
like "where distance(geomA, geomB) > 1000".  Oh, and I guess you'll need 
a filter condition to compare only As and Bs.

Paul Ramsey wrote:
> Brain freeze:
>
> Give a table
>
> gid integer
> geom geometry
> letter varchar
>
> where letter is a single letter,
>
> how to efficiently find all the instances of the letter 'A' that are
> more than 1000m from any letter 'B'.
>
> P.
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>   

-- 
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022




More information about the postgis-devel mailing list