[postgis-users] Re: Newbie questions on what geometry to use
woodbri at swoodbridge.com
Mon Jul 3 20:30:59 PDT 2006
This should be very fast, just make sure the geometry column has GIST
index on it and that you vacuum analyze the table.
You will need to adjust the example below so that you are using the same
srid as your geometry and you point will need to be specified by lat/lon
and distance and the expand will be in degrees depending on the accuracy
you need, you can either approximate the the distance as degrees, but
read the archives on the pros and cons of this. Or you can project you
points into UTM projection and get a more accurate result.
> I think I found the best solution to my problem. Set a bounding box
> on the point I am searching from in conjunction with Distance. Like
> so (I found this in another post):
> SELECT AsText(geom) FROM point_table
> geom && Expand(GeometryFromText('POINT(10000 20000)',2769),900)
> Distance(geom,GeometryFromText('POINT(10000 20000)',2769) < 900
> How efficient would something like that be against say 5000 rows?
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users