[postgis-users] spheroid bounding box calculation

Paul Ramsey pramsey at cleverelephant.ca
Wed Jul 22 23:37:12 PDT 2009


http://trac.osgeo.org/postgis/wiki/UsersWikiExamplesFindNearbyLatLon

On Wed, Jul 22, 2009 at 11:19 PM, Jeff Davis<pgsql at 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.
>
> Thanks.
>
> Regards,
>        Jeff Davis
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list