From: Michael Bedward <michael.bedward@gm...> - 2008-05-21 02:16:11
A JTS related question...
Thomas has been helping me to test the raster to vector routine I'm
working with. He has a raster that is too complex for the routine to
In its present form the routine generates a set of LineStrings, each
being a boundary segment, and then gives them all to a JTS Polygonizer
object to assemble the polygons.
Thomas's raster has Avogadro's number of tiny polygons and the routine
hits an out of memory error while still collecting boundary segments.
I have an idea for a work-around:
(1) Scan the raster row-wise until a specified max number of boundary
segments have been collected
(2) Process these segments with Polygonizer: save polygons to disk;
(3) If more raster rows remain, retrieve unused edges from the
polygonizer with the getDangles and getCutEdges functions.
(3) Re-initialize the polygonizer and feed it the left-over edges from (2).
(4) Return to (1)
If this is valid it could also be used to handle tiled rasters.
I'd appreciate any comments on this approach or alternatives,
especially from the JTS gurus among you.
Get latest updates about Open Source Projects, Conferences and News.