Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intersection returns incorrect result if polygon passes the pole area #991

Closed
MansoorAhmadi opened this issue Jul 19, 2023 · 2 comments
Closed

Comments

@MansoorAhmadi
Copy link

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

@dr-jts
Copy link
Contributor

dr-jts commented Jul 20, 2023

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.

@MansoorAhmadi
Copy link
Author

Ok.
Thank you. for your reply.

@dr-jts dr-jts closed this as completed Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants