Skip to content
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

updates cluster build #46

Merged
merged 5 commits into from
Feb 24, 2023
Merged

updates cluster build #46

merged 5 commits into from
Feb 24, 2023

Conversation

r-akemii
Copy link
Collaborator

  • Adds test_zone_builder (we hadn't had any tests for zone_builder before)
  • Adds pop_Nauru.tif to tests/data
  • Adds nauru_pop_test to conftest
  • Fixes export_hex_population as it was breaking previously (it wasn't possible to know that before as we had no tests)
  • Fixes hex_pop.sql to save MultiPolygons instead of Polygons (after overlaying model area and hex bins, several hexs are cropped and turn to multipolygon)
  • Fixes create_clusters to be compliant with pygeos removal (now geopandas is working only with rtree). I have added a raise ValueError to avoid situations which a hex bin's population is greater than max_zone_pop. I have also changed the while loop as it wasn't breaking when there were no islands in remove_islands

after removing pygeos, it was necessary to change some code lines to work with rtree
solves adjacency problems when building zones
@pedrocamargo pedrocamargo merged commit 8d98ff5 into main Feb 24, 2023
@pedrocamargo pedrocamargo deleted the renata/fixes-zone-building branch February 24, 2023 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants