Tuesday, 2 June 2015

postgis - How to merge close points into polygon?


I have a set of coordinates (points & no overlaps) in a single table,each containing attribute number fields,like in the following image.


enter image description here


I want to merge these points into smallest polygons by closest distance like red lines drawn around them,and aggregate attributes fields with them as well.



How can i do it in PostGIS or Spatialite ?



Answer



I think the answer that @klewis linked to is probably your best resource, another question that discusses this as well is:



You may also want to look at a couple of other PostGIS 2.0 commands, which may meet your needs:



  • ST_ConcaveHull - represents a geometry that encloses all geometries within the set. You can think of it as shrink wrapping.

  • ST_ConvexHull - represents the minimum convex geometry that encloses all geometries within the set.


BostonGIS.com has a good visual description of Concave Hull's.



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...