Andrea Aime schrieb:
> Matthias Lendholt ha scritto:
>> Dear list,
>> I have a shapefile with about 6000 multi polygon features (each having
>> more than 100 vertices) and I need them merged to one feature. (I just
>> need the outline/border).
>> What is the best algorithm to realize this with geotools?
>
> Extract the geometries from the features and use JTS.
> Repeated merge or buffer(0) of the collection should be the way.
In both cases
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space.
My next try was to split it up into chunks (each 200 geometries) but
after ~4000 the OutOfMemoryException occured. I guess those features
have to many vertices and there's no chance to get them into the memory.
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at
com.vividsolutions.jts.noding.SegmentNodeList.createSplitEdge(SegmentNodeList.java:243)
at
com.vividsolutions.jts.noding.SegmentNodeList.addSplitEdges(SegmentNodeList.java:193)
at
com.vividsolutions.jts.noding.NodedSegmentString.getNodedSubstrings(NodedSegmentString.java:66)
at
com.vividsolutions.jts.noding.NodedSegmentString.getNodedSubstrings(NodedSegmentString.java:58)
at
com.vividsolutions.jts.noding.MCIndexNoder.getNodedSubstrings(MCIndexNoder.java:70)
at
com.vividsolutions.jts.operation.buffer.BufferBuilder.computeNodedEdges(BufferBuilder.java:191)
at
com.vividsolutions.jts.operation.buffer.BufferBuilder.buffer(BufferBuilder.java:152)
at
com.vividsolutions.jts.operation.buffer.BufferOp.bufferOriginalPrecision(BufferOp.java:309)
at
com.vividsolutions.jts.operation.buffer.BufferOp.computeGeometry(BufferOp.java:276)
at
com.vividsolutions.jts.operation.buffer.BufferOp.getResultGeometry(BufferOp.java:270)
at
com.vividsolutions.jts.operation.buffer.BufferOp.bufferOp(BufferOp.java:146)
at com.vividsolutions.jts.geom.Geometry.buffer(Geometry.java:990)
Thanks anyway!
Matthias
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org_______________________________________________
Geotools-gt2-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users