[postgis-users] Transforming 4326 for quick st_dwithin meter measurements
y.t at garrettheaver.net
Thu Jan 29 03:02:43 PST 2009
I've a load of point data i'm storing in SRID 4326. I want to do selects
using ST_DWithin(a,b,distance) where the distance is in meters so clearly I
need to transform the a and b geometries to some SRID thats meter based?
Can anyone suggest what i should use? The points are located all over the
world (hence a UTM zone might not be suitable? perhaps World Mercator
54004?) but the actual DWithin distance will never be more than 20KM.
Also, I want to calculate the actual distance between geometry a and b as
part of the select, I suppose using ST_Distance_Sphere is my best option?
The precision isn't a major factor. Errors of up to 200M over a real
distance of 20KM are acceptable for the solution. Will ST_Distance_Sphere
suffice or should I move up to ST_Distance_Spheroid?
More information about the postgis-users