#294: reserving to much memory inPolygon::GetCoordinates
------------------------+---------------------------------------------------
Reporter: jaapdekker | Owner:
[hidden email]
Type: defect | Status: new
Priority: major | Milestone:
Component: Default | Version: 3.0.3
Severity: Unassigned | Keywords:
------------------------+---------------------------------------------------
A length error exception is thrown when Polygon.GetCoordinates() is called
with a polygon(sea area around Scotland) with 1396535 coordinates where
the shell has size 411057 and that contains 7998 holes (Islands in the
sea) the error is caused in Polygon.cpp where a reserve is done with the
wrong size
the error is on line 123 in Polygon.cpp
npts=shellCoords->getSize();
/*
* reserve space in the vector as if all holes have the same
* amount of points. Holes usually have less, so this should
* be a good compromise
*/
cl->reserve((nholes+1)*npts);
causing 3,287,633,886 Coordinates to be allocated
--
Ticket URL: <
http://trac.osgeo.org/geos/ticket/294>
GEOS <
http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).
_______________________________________________
geos-devel mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/geos-devel