Aggregating detached polygons using open source software

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:

Query:

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

Examples:

Orthogonal Aggregation of Buildings

figure 1

Non Orthogonal Aggregation of Natural Objects

enter image description here

i hope it helps you...


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