Is there any open-source library to aggregate detached polygons?

I know that there is a tool in ArcInfo, but it is commercial.

  • Knowing which tool in ArcInfo are you trying to replicate would be helpful. Are you referring to the Dissolve function? or something else? Apr 30 '12 at 17:57
  • I assume Sanjeewa means the actual 'Aggregate Polygons' tool (requires ArcInfo). In ArcGIS 10 it is under the Generalization tools of the Cartography toolbox. It produces a sort-off concave-hull for want of a better term. May 3 '12 at 14:02

if you have PostgreSQL, there is a sql function which have been writed from Dr. Horst Duester. he has two sql code, one is for Orthogonal Aggregation of Buildings and another is for non Orthogonal Aggregation... you can find sql codes here.

it determines edge of objects very good way with defination of threshold..and its query is so easy to use:


select aggregatepolygons(wkb_geometry, 50, true) from buildings group by art;


Orthogonal Aggregation of Buildings

figure 1

Non Orthogonal Aggregation of Natural Objects

enter image description here

i hope it helps you...

  • 1
    The link to the code is broken. Could anyone add this code here again? Jan 3 '18 at 16:35

Try the Java Topology Suite (JTS). There is a user guide which has a heading "How to Union Many Polygons Efficiently".


PostGIS has a ST_ConcaveHull function which equates closely to the Aggregate Polygons function of ArcGIS. Sadly Spatialite does NOT have this function.

A concave hull can be thought of as a "shrink-wrapped" convex hull.


Also, Sextante is a GIS library for Java. It may include that functionality - http://www.sextantegis.com/


The aggregatepolygons function is published at github under:


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.