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

Updated h3==3.7.7 to h3==4.1.2 #39

Merged
merged 3 commits into from
Jan 11, 2025
Merged

Conversation

jeronimoluza
Copy link
Contributor

This pull request is to update the polyfill of the geometries to hexagons using the latest H3 library.
I tested the example in the README.md and the behavior is still the expected.

A few minor changes:

  • I updated the requirements.txt so it now installs version h3==4.1.2.

  • Some scripts (urbanpy/geom/geom.py and urbanpy/utils/utils.py) were using old h3 imports: from h3 import h3.

    • I changed those to just import h3.
  • The example in the README.md was wrong:

    • up.geom.gen_hexagons(res, city) is supposed to return a geopandas.GeoDataFrame with the hexagons and the geometries. The example was doing something like hexs, hex_centroids = up.geom.gen_hexagons(res, city), which is not how the function is used.

@jeronimoluza
Copy link
Contributor Author

jeronimoluza commented Dec 19, 2024

I also changed a call to an h3 library function from the resolution_downsampling() function. This was causing the tests not to pass.
@Claudio9701 everything ready!

@Claudio9701 Claudio9701 merged commit d40f60c into EL-BID:master Jan 11, 2025
9 checks passed
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