New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coordinate problem with ProjectionMercator #88
Comments
This happens to me as well if I use the default elevation model without any elevation data turned on. I think officially only the ZeroElevationModel is supported in 2d mode. Try adding this to your code -
|
Actually the ZeroElevationModel is used already so this does not seem to be the problem. |
The problem seems to be in the reverse mercator projection. If I replace the reverse function cartesianToGeographic with a traditional iteration approach everything is fine. So the problem seems to be in the optimized formulas or the series expansion used for computational efficiency has to be extended? Here the traditional iteration code: `@Override
|
@helgekoch thanks for the psuedo code example, I see the same issue. |
Looking at the Google book version of the source document, it looks like series 3-5 from page 45 was identified as equation schema 3-38 from page 19, but it actually looks like 3-34. That's my two cents, or, am I misreading things? So
I think that that's how it should look... |
The new 2D support is very nice. Thanks for this!
But unfortunately there seems to be a coordinate transformation issue probably related to the mercator projection. When I put a PointPlacemark into a 2D map using ProjectionMercator from a mouse listener the actual point of the icon on the screen seems to be systematically moved to the north (at least with german coordinates around 50.7, 7). This occurs also when moving the map around and when turning the map (the screen point is always shifted to the north). Since the distance shift seems to be constant this can best be seen using a small map scale.
There is no error when using ProjectionEquirectangular or ProjectionSinusoidal.
Version: 2.1.0
-- edit --
The following "pseudo" code produces coordinates with a distance error of around 50 meters.
`GeographicProjection projection = new ProjectionMercator();
double latitude = 50.7;
double longitude = 7.017;
The text was updated successfully, but these errors were encountered: