Jeff,

* Jeff Davis (pg...@j-davis.com) wrote:
> I would like to query my latitude/longitude points  for distance in a
> way that uses the index. The points are in lat/lon, so st_dwithin(g1,
> g2, [meters]) makes no sense.
> 
> What is the recommended way to do this? I think what I need is a
> function that takes a point in lat/lon, and a distance in meters, and
> returns a bounding box in lat/lon.
> 
> Basically, I think it would be a variant of ST_Expand, but it could take
> an argument in meters rather than degrees. It may need a 'SPHEROID[]'
> argument, too, perhaps.

Why do you care about it being in meters..?  Just make sure that
st_expand will grow it large enough to be within the distance limit
you're looking for everywhere, and then convert to UTM for the actual
source point and use distance() there to further refine the search.

Use the bounding box to narrow the search, don't try to use it *as* your
search criteria.

        Thanks,

                Stephen

Attachment: signature.asc
Description: Digital signature

_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to