locationtech / spatial4j

LocationTech Spatial4j: A Geospatial Library for Java

Home Page:https://projects.eclipse.org/projects/locationtech.spatial4j

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JtsGeometry.getBuffered doesn't buffer across the dateline

tadrinth opened this issue · comments

https://github.com/locationtech/spatial4j/blob/master/src/main/java/org/locationtech/spatial4j/shape/jts/JtsGeometry.java#L177

We are using the getBuffered method to find records that are near the record queried. It doesn't buffer across the dateline, though, so if the query record is next to the dateline, we won't find nearby records properly even though they are geographically close to the query record because the buffered geometry stops at the dateline.

There is a TODO to fix this. Any chance of this being improved? The current implementation is better than the homebrew implementation we were using, in that it at least stops at the dateline rather than generating invalid longitudes, so I am very appreciative of the existing work that's gone in.