-
Notifications
You must be signed in to change notification settings - Fork 77
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
LineObject is not positioned properly on the map #12
Comments
Hi, Thanks for letting me know. When I wrote this library, my use cases never included using such large objects. So I never ran into this. Probably this is a problem with conversion between coordinate spaces while drawing objects...I think I am taking some lazy shortcuts which are not "too bad" at a small/local scale but on a large scale like 200km the errors will become apparent. I will try to take a look at this soon and see if I can make it work. |
Hi, Thanks for your quick response. I think that the issue is that information about map projection is hidden in PrivateQGraphicsObject, and LineObject itself knows only its position to paint itself. However both endpoints of the line require map projection. |
Hello again, Spent some time looking at this... might be tricky to make it work in a good way since the framework currently assumes that drawing takes place in East-North-Up coordinates (or rather just East-North since we only do 2D). ENU makes a flat earth assumption... which isn't too horrible over small distances, but of course it breaks down over hundreds of km. I will think some more about this... let me know if you come up with a good way to handle this (or better yet, submit a pull request 😄 ) |
I tried to draw a line that connects two points 200 km apart. But one of ends of line was about 7 km to south of the first point, so the line did not pass through the point.
Code fragment:
The text was updated successfully, but these errors were encountered: