1

I use SRID 4326(WGS 84). So what is the measure of distance in ST_ClusterWithin . m, km, degree ? I ask it because in documentation it only says:

geometry[] ST_ClusterWithin(geometry set g, float8 distance);

while ST_DWithin function signature at the same time looks like:

boolean ST_DWithin(geometry g1, geometry g2, double precision distance_of_srid);

boolean ST_DWithin(geography gg1, geography gg2, double precision distance_meters);

boolean ST_DWithin(geography gg1, geography gg2, double precision distance_meters, boolean use_spheroid);

As i know distance_of_srid for 4326 is degrees.

1

It will be in degrees if you use SRID 4326. From here :

"--Geometry example - units in planar degrees 4326 is WGS 84 long lat unit=degrees"

|improve this answer|||||
  • 1
    I know this is typical issue in postgis, but just out of curiosity: can you give any real life example where "distance in degrees" makes really sense? Or even give workaround to the issue for global dataset, without significant loss of accuracy? – JaakL Sep 27 '16 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.