Purpose of LatLngPoly and LatLngMultiPoly, and the potential for geometry methods. #456
Replies: 2 comments
-
You're right that the intention is for them to be lightweight containers to provide an input structure for functions like We had also seen recurring issues around confusion between lat/lng ordering (what H3 uses) and lng/lat ordering (what GeoJSON, Shapely, GeoPandas use). Hopefully these classes make that expectation explicit. That being said, we also wanted these objects to be broadly compatible with other geospatial Python libraries, so they can convert to and from the standard For example, you can convert to Shapely to perform geometry operations: ![]() And regarding your questions around |
Beta Was this translation helpful? Give feedback.
-
Thank you for your comment, and I agree that the lightweight nature of LatLngPoly and LatLngMultiPoly is a major advantage. After reviewing my source code again, I can confirm that in my case, managing data on AWS and using H3 cells as keys in a key-value style data structure (like S3) allows me to efficiently retrieve data associated with each H3 cell. Here’s a simplified version of my pipeline:
With some tuning of data granularity and H3 resolution, the Lambda-backed API typically responds in about 700 milliseconds — performant enough for production use. In addition, some map applications access data using tile-based polygonal regions in a distributed format.
I’m currently using my own implementation for polygon-to-cell conversion, but I plan to migrate to these once they’re no longer marked as experimental. So far, this direction has been the main focus in my use case. Thanks again for your work on h3-py and it’s been incredibly useful for geospatial processing in cloud-native environments like AWS. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm digging through the codebase and trying to understand the purpose of
LatLngPoly
andLatLngMultiPoly
.They seem to be data containers for lat/lng polygons (with holes, in the case of
LatLngPoly
).But they don’t perform any geometry operations themselves, no
.contains()
,.intersects()
, etc.polyfill()
or similar?Appreciate any insight! I want to try to get a clearer picture of how these are meant to be used.
Beta Was this translation helpful? Give feedback.
All reactions