[postgis-users] Filtering Points Based On Proximity

Martin Chapman mchapman at texelinc.com
Sun Mar 23 16:07:18 PDT 2008


Not sure how to do a radius search in PostGIS but you will definitely need
to use the geos DISJOINT function somehow to get points outside your circle.
Maybe start with a rectangle and do a search for radius query.  Hope that
helps somewhat.  Maybe it can be combined with a DISTANCE from your center
point?

 

Best regards,

Martin

 

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Oliver
Monson
Sent: Sunday, March 23, 2008 4:50 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] Filtering Points Based On Proximity

 

Hi, 
I'm a very new PostGIS user but I need to solve a somewhat complex filtering
problem (anyway I think its complex...)

I have around 300,000 points, each with a lat, lon and altitude (also
converted to geometry). I need to get a subset of those points, where none
of them are within 5m (or some other arbitrary distance) of each other. It
doesnt matter which points get picked over another, as long as whatever the
data set it creates, that none of the points are within that 5m radius and
that relatively most of the points are used (the points are scattered across
a 20km squared area). I have other data like a timestamp for each point so I
can give priority to the more recently created points, if that helps as a
starting point. If it makes it any easier, the altitude can be ignored and
we can treat it as a set of points on a 2D plane. 
But how would I go about doing this? I really have no idea where to start.
What would the SQL query look like? Any help would be appreciated, thanks!

-Oliver

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080323/15c8a783/attachment.html>


More information about the postgis-users mailing list