Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 1
    unnest(clst.arr) with ordinality, sweet. I have absolutely no idea if this answers the question or not, but it is a fabulous answer to some question :-) Commented Mar 7, 2018 at 14:23
  • @ThingumaBob I tried your method, and seems similiar to point aggregation in ArcGIS. This doesn't cluster all points. I have some points which are in a distance of 2, 7 meters are not clustered. I want all points which are separated by 10 m max be grouped on a polygon. Commented Mar 7, 2018 at 14:32
  • You can use row_number () over ())::integer to populate a sequential id col Commented Mar 7, 2018 at 14:34
  • @Vince Of course, thanks, but I was just adding to the inital query, so the second one is a mere mockup to exclude non-polygons. I´ll add a better one ASAP (since then the whole ordinal extraction is only overhead)... Commented Mar 7, 2018 at 14:42
  • 1
    Definitely use ST_ClusterDBSCAN if you want to assign IDs back to the original points; see gis.stackexchange.com/a/273613/18189 Commented Mar 7, 2018 at 15:18