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.

rkm
  • 1,751
  • 12
  • 22
galakt
  • 113
  • 5

1 Answers1

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"

PyMapr
  • 1,630
  • 1
  • 16
  • 31
  • 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 08:59