-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use geodesic conversion of meters, avoid empty polygon #60
Conversation
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this is seriously impressive! Good first principals approach 🎉
It does break the tests for split_by_square though: https://github.com/hotosm/fmtm-splitter/actions/runs/11550316031/job/32145058693?pr=60 The split is generating 60 squares in the test instead of the previous 50 we had hardcoded to check against. |
@spwoodcock , Does it necessarily need to produce same output from using multi polygon aoi and single polygon aoi (that are used in test cases)? |
This one is great! Perhaps the squares are a bit smaller due to the more accurate representation of metres (the hardcoding previously must have been a bit inaccurate) |
I think the tests can just be updated to match the new outputs, then this can be merged 😃 |
ok i will just update the test case then |
Actually I am using multipolygons where the polygons aren't connected, but had to write my own splitting code since fmtm-splitter previously kept forcing me to make a data extract at the same time. Think field mapping amenities in multiple small towns... Sorry for the hacked meters/degrees conversion, at that time I figured for splitting by squares, accuracy wasn't important. After recent changes, I'm hoping to go back to using fmtm-splitter at some point. |
Description:
This PR uses geodesic conversion formula to convert meters to degrees (lat, lon) instead of hardcoded degree to convert meters to degree. Additionally, it fixes the issue of appending empty polygons to geojson output.
Updates:
Geodesic conversion includes the use of WGS:84 Ellipsoidal parameters such as :
Issue: