Open zacharyDez opened 1 month ago
@kylebarron; some weird behavior with points I might need help with:
@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.
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.