[postgis-devel] Non-Join Join

Obe, Regina robe.dnd at cityofboston.gov
Sun Jul 20 10:43:04 PDT 2008


Martin,
 
Done.  I guess it should go in the official docs too as an example of ST_DWithin.
 
http://postgis.refractions.net/support/wiki/index.php?ExamplesAntiNear
 
Also I think Queen is more fitting than master don't you think :)

Thanks,
Regina
________________________________

From: postgis-devel-bounces at postgis.refractions.net on behalf of Martin Davis
Sent: Fri 7/18/2008 5:28 PM
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] Non-Join Join



And I nominate you to post this to the PostGIS wiki!  8^)

Martin Davis wrote:
> I bow to the master.
>
> Obe, Regina wrote:
>> Wrong Martin.  Find all that are within 1000 with a left join using an
>> indexed search and then throw out those that don't have matches.
>> If it has no neighbor within 1000 feet then all its neighbors must be
>> more than 1000 feet away.
>>
>> -----Original Message-----
>> From: postgis-devel-bounces at postgis.refractions.net
>> [mailto:postgis-devel-bounces at postgis.refractions.net] On Behalf Of
>> Martin Davis
>> Sent: Friday, July 18, 2008 5:21 PM
>> To: PostGIS Development Discussion
>> Subject: Re: [postgis-devel] Non-Join Join
>>
>> 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

_______________________________________________
postgis-devel mailing list
postgis-devel at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-devel




-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20080720/be5dfaad/attachment.html>


More information about the postgis-devel mailing list