This repository has been archived by the owner on Oct 5, 2024. It is now read-only.
Replies: 2 comments
-
It looks like the problem was with... map projection :) Adding a function to convert each coordinate from Epsg4326 to Epsg3857 would solve the issue. This is the C++ version of that function: void Geo::epsg4326toEpsg3857(double& x, double& y) {
x = (x * 20037508.34) / 180;
y = (std::log(std::tan(((90 + y) * M_PI) / 360))) /
(M_PI / 180);
y = (y * 20037508.34) / 180;
} Thanks @caprieldeluca for your help! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Issue was solved, thanks for your help! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Do you have good math and/or GIS skills?
We need your help :)
Hi everyone! as part of the HOT efforts to improve the quality of the mapping, we're working on tools for validation.
Challenge: un-squared buildings
One of the things that we're doing is to identify buildings that have not angles squared.
Goals
Problem
The function being used for calculating each internal angles is the following.
But the calculations are not working as expected.
For example, if we take this polygon and calculate the angle of each of its 10 corners. All of them are ~90 degrees.
Is squared? True
But if we take the same polygon and rotated it a little bit, the results change and none of the calculated angles are ~90 degrees.
Is squared? False
Solution
We invite contributors to find a solution to this problem.
To help testing and showing your solution, there's a Jupyter Notebook available.
You can check the Gist on my account, that you can also download and use on your local Jupyter server:
https://gist.github.com/emi420/32f33dc16e6e1789cd8077306fac53a5
And there's also a copy of it on Google Colab:
https://colab.research.google.com/drive/1ogPJOIiqhE3yi9mexKaCVCR89DQqK6YA#scrollTo=YWzOVVyb4Aaa
Can you help? please post your solution here. It can be a link to your own code, a copy of the notebook or just a comment explaining what's wrong and how can be fixed.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions