-
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
Feature/h3ronpy #75
Feature/h3ronpy #75
Conversation
@kylebarron; some weird behavior with points I might need help with: |
h3ronpy currently has a bug with cells_to_wkb_points which returns matching coordinates.
* create stac catalog from sample kenya data * testing metadata * update metadata files * typo * Update catalog with link to self and title based on stac-check best practice * Move METADATA to space2stats_ingest * fix sources link * rewrite catalog with self link and item titles * Rename duplicated variable gdf to adm_gdf * Corrected the color breaks * Adapt based on h3ronpy and adapt colormap * Change formatting, ensure clear runs, and remove unused imports * Add nbqa pre-commit for notebooks --------- Co-authored-by: Andres Chamorro <[email protected]>
@zacharyDez I ran the test files specified above and they are all passing. However, I couldn't find this notebook: notebooks/user-docs/space2stats_api_bug.ipynb Has it been removed on purpose, is it still relevant? |
Yes! It's been fixed in the new release of h3ronpy, so I removed the notebook. |
e7f74a2
to
dab5671
Compare
dab5671
to
798b7fe
Compare
8588b2e
to
701d6f9
Compare
f5ef36a
to
9ffdfe8
Compare
9ffdfe8
to
d07bc21
Compare
PR Deployment Details: |
What I Changed
Refactored
generate_h3_geometries
function:uint64
format and converting them to geometries (either polygons or points).cells_to_wkb_polygons
for polygons andcells_to_wkb_points
for centroids.Adjusted
aggregate
andsummaries
methods inStatsTable
:cells_to_string
to convert H3 IDs before database operations.ValueError
check if the query returns no rows (to catch invalid fields).Unit Tests:
test_h3_utils.py
andtest_module.py
to reflect the changes in how geometries are generated.aggregate
should now raise aValueError
).Error Fixes:
TypeError: Expected pyarrow Buffer, but got LargeBinaryScalar
by ensuring proper conversion from pyarrow Scalar types.How to Test It
Unit Tests:
pytest
on the following test files:tests/test_module.py
tests/test_h3_utils.py
tests/test_api.py
StatsTable
methodsNotebooks:
notebooks/user-docs/space2stats_api_bug.ipynb
, which shows how point geometries aren't being generated properly.Other Notes
notebooks/user-docs/space2stats_api_bug.ipynb
shows an example where point geometries are not being generated correctly. Further investigation is needed into the issue with point geometries and H3 ID conversion.