http://lin-ear-th-inking.blogspot.com/2007/11/fast-polygon-merging-in-jts-using.html?
On Fri, Sep 11, 2009 at 5:26 AM, Markus Eichhorn
<
[hidden email]> wrote:
> Hi list,
> I've been trying to union a collection of Geometry-object (all elements are
> polygons). But with the
> geometry.union(other); it is much to slow for huge collection. In the end.
> it should work with collection within 20.000 and more geometries.My code
> looks like this:
>
> private Geometry unionIntoOneGeometry(
> Collection<Geometry> geometryCollection) {
> Geometry all = null;
> for (Iterator<Geometry> i = geometryCollection.iterator();
> i.hasNext();) {
> Geometry geometry = i.next();
> if (geometry == null)
> continue;
> if (all == null) {
> all = geometry;
> } else {
> all = all.union(geometry);
> }
> }
> return all;
> }
> Is there a better way to union all these polygons? I don't find a way with
> good performace.
> Thanks,
> Markus
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.
http://p.sf.net/sfu/bobj-july> _______________________________________________
> Geotools-gt2-users mailing list
>
[hidden email]
>
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users>
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users