Closed KrazyD closed 2 years ago
Sorry @KrazyD I missed this. I'll have a look.
by setting latitude to 90 you are on the North Pole. That is a singularity for predictions based on direction because north, south, east, west are meaningless or ambiguous at that point. The relevant code is in https://github.com/davidmoten/grumpy/blob/master/grumpy-core/src/main/java/com/github/davidmoten/grumpy/core/Position.java:
I'm trying to create
com.github.davidmoten.rtree2.geometry.Geometries.rectangle
from coordinatescom.github.davidmoten.grumpy.core.Position
with following code:But, when create
Position.from(90D, -179D)
,east.getLon()
give -89, whilewest.getLon()
give 90.9. In this case rectangle creation throwIllegalArgumentException()
in constructor ofRectangleDouble()
. A similar exception i am getting when create Position with positive longitude. I have not yet been able to figure out which formula is used in thepredict()
method. This seems to be the formula for finding bearing.Could you, please, help me to figure out, how to fix my problem creating rectangle given longitude and latitude.