locationtech / jts

The JTS Topology Suite is a Java library for creating and manipulating vector geometry.
Other
1.94k stars 442 forks source link

Bad calculations with geometries in the 180 meridian (anti-meridian) #972

Closed UnaiUribarri-TomTom closed 1 year ago

UnaiUribarri-TomTom commented 1 year ago

Let us define a rectangle that centred on the 180 meridian, with the north-west corner at latitude 1, longitude 179 and the east-south corner at latitude -1, longitude -179.

Some geometry calculations over this rectangle are invalid:

mprins commented 1 year ago

AFAIK JTS is not aware of projections and works in a Cartesian space so this is expected IMO.

see also: https://locationtech.github.io/jts/jts-faq.html#F1