Closed MansoorAhmadi closed 1 year ago
The intersection between two polygons or multi-polygons return an incorrect result when a polygon passes or if it's located on the pole.
We read the polygon coordinates using the WKT reader and insect using the Geometry class.
WKTReader reader = new WKTReader(jtsGeometryFactory); Geometry polygon1 = reader.read(myFirstPolygonAsString); Geometry polygon2 = reader.read(mySecondPolygonAsString);
Geometry intersection = polygon1.intersection(polygon2); if (polygon1.intersects(polygon2)) { list.add(matched polygon); }
Please, find attached a full report [with screenshots] of the bug.
We remain available, shall you have any questions.
Thank you Geometry bug report-revised.pdf
As mentioned in the FAQ here, JTS only supports planar coordinate systems, not geodetic ones. So I think your expectation of what the results should be is incorrect.
Ok. Thank you. for your reply.
The intersection between two polygons or multi-polygons return an incorrect result when a polygon passes or if it's located on the pole.
We read the polygon coordinates using the WKT reader and insect using the Geometry class.
WKTReader reader = new WKTReader(jtsGeometryFactory); Geometry polygon1 = reader.read(myFirstPolygonAsString); Geometry polygon2 = reader.read(mySecondPolygonAsString);
Geometry intersection = polygon1.intersection(polygon2); if (polygon1.intersects(polygon2)) { list.add(matched polygon); }
Please, find attached a full report [with screenshots] of the bug.
We remain available, shall you have any questions.
Thank you Geometry bug report-revised.pdf