Hi,

On 08/02/11 14:13, kenneth gonsalves wrote:
actually I am looking for an sql query.

That would typically be done using the st_dwithin function. That function internally makes a bounding box comparison, thereby taking advantage of any geographic indexes you might have, and only then checks the actual distance.

But note that the "actual distance" is always in projection units, i.e. if you have spherical mercator then it will be approximately meters, but not really meters.

If you want proper meters, look up st_distance_sphere and st_distance_spheroid and/or think about converting from geometry to geography data type.

Bye
Frederik

_______________________________________________
talk mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/talk

Reply via email to