You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that the position predictor has difficulties near the dateline meridian.
You can see in the output below that it's a positive value instead of a negative one.
Testcase:
public void test180Meridian() {
int distanceKm = 10;
Position from = Position.create(-16.796686666666666, -179.99983333333333);
Position north = from.predict(distanceKm, 0);
Position south = from.predict(distanceKm, 180);
Position east = from.predict(distanceKm, 90);
Position west = from.predict(distanceKm, 270);
System.out.println(north);
System.out.println(south);
System.out.println(east);
System.out.println(west);
Geometries.rectangle(west.getLon(), south.getLat(), east.getLon(), north.getLat());
}
java.lang.IllegalArgumentException
at com.github.davidmoten.guavamini.Preconditions.checkArgument(Preconditions.java:25)
at com.github.davidmoten.rtree.geometry.internal.RectangleDouble.<init>(RectangleDouble.java:14)
at com.github.davidmoten.rtree.geometry.internal.RectangleDouble.create(RectangleDouble.java:23)
at com.github.davidmoten.rtree.geometry.Geometries.rectangleDouble(Geometries.java:58)
at com.github.davidmoten.rtree.geometry.Geometries.rectangle(Geometries.java:36)
The text was updated successfully, but these errors were encountered:
I think there are some normalization offerings with other methods like Geometries.rectangleGeographic. You may still have to break your desired search region into two rectangles (one left of the 180 longitude line and the other right of it).
It appears that the position predictor has difficulties near the dateline meridian.
You can see in the output below that it's a positive value instead of a negative one.
Testcase:
Output:
Stacktrace:
The text was updated successfully, but these errors were encountered: