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
This is the tunneling distance, but given how close the points are, the geodesic distance won't be very different.
The documentation claims that the EastNorth is a local coordinate system that wraps around Earth. I would expect that distances, at least locally, in that system should be correct. Try:
P.S. To handle rounding off problems, it would be nice if the EastNorth conversion could be done with respect to any specified origin for the local coordinate system.
The text was updated successfully, but these errors were encountered:
[...] you can add and subtract EastNorth to / from any Coordinate{2}. The EastNorth coordinate is then interpreted as a translation of the other coordinate.
This is clearly a bug which needs to be fixed, but I'll first take some time to think through the overall roadmap for coordinate arithmetic. My original intention with this package was only to provide a convenient API for coordinate conversion; I so far haven't thought much about arithmetic, and hence there are a couple of quirks in this area.
P.S. To handle rounding off problems, it would be nice if the EastNorth conversion could be done with respect to any specified origin for the local coordinate system.
Rounding errors happen the moment you convert your latitude and longitude to Float64.
(The North error is zero here because the Lat to North conversion internally rounds to Float64.)
I'm therefore not sure whether there's anything we can do here. But also, there's actually not much reason for concern. The maximal rounding error is the world's circumference ( $O(10^7)$ ) times the machine epsilon ( $O(10^{-16})$ ), i.e. on the order of nanometers. Problems only arise if you try to do coordinate arithmetic in Float32, but in that case MapMaths can't really help you as pointed out earlier.
Consider two nearby points on Earth:
The distance between them is:
This is the tunneling distance, but given how close the points are, the geodesic distance won't be very different.
The documentation claims that the
EastNorth
is a local coordinate system that wraps around Earth. I would expect that distances, at least locally, in that system should be correct. Try:Clearly this isn't the distance between
p1
andp2
.The problem doesn't seem to be in rounding off in floating point due to large east-north coordinates either:
P.S. To handle rounding off problems, it would be nice if the
EastNorth
conversion could be done with respect to any specified origin for the local coordinate system.The text was updated successfully, but these errors were encountered: