locationtech / spatial4j

LocationTech Spatial4j: A Geospatial Library for Java
https://projects.eclipse.org/projects/locationtech.spatial4j
932 stars 167 forks source link

unwrapDateline on a polygon with a hole #220

Open jrnorth opened 2 years ago

jrnorth commented 2 years ago

https://github.com/locationtech/spatial4j/blob/2926812ae302c6e0f24fb5995b1fd24be7fe0b56/src/main/java/org/locationtech/spatial4j/shape/jts/JtsGeometry.java#L492

Why does this check in unwrapDateline() require the exterior ring of a polygon to contains() any interior rings? Doesn't contains() on two LineStrings require one to be a subset of the other? If so, you wouldn't be able to have polygons that contain holes and cross the dateline, which is the problem I'm running into.