Open FObermaier opened 1 year ago
Calling Geometry.buffer(double) on a Polygon with interior ring that was created using a GeometryFactory with a fixed PrecisionModel might remove the interior ring:
Geometry.buffer(double)
Polygon
GeometryFactory
PrecisionModel
public void testBufferRemovesHole() throws ParseException { GeometryFactory gf = new GeometryFactory(new PrecisionModel(1000)); Geometry geom = new WKTReader(gf).read("POLYGON ((0 0, 0 4, 4 4, 4 0, 2 0, 0 0), (2 0, 3 1, 2 2, 1 1, 2 0))"); assertTrue(geom.isValid()); geom = geom.buffer(0.001); assertTrue(geom.isValid()); assertEquals(1, ((Polygon)geom).getNumInteriorRing()); }
first reported: https://github.com/NetTopologySuite/NetTopologySuite/issues/638
It may be the same error I reported here, but with the interior hole being the geometry disappearing.
Calling
Geometry.buffer(double)
on aPolygon
with interior ring that was created using aGeometryFactory
with a fixedPrecisionModel
might remove the interior ring:first reported: https://github.com/NetTopologySuite/NetTopologySuite/issues/638