geodesic.boson.SearchTransform.h3#
- static SearchTransform.h3(resolution, return_all=False)[source]#
Adds the H3 cell to properties.
See https://h3geo.org/ for more details.
Defaults to returning the H3 cell of the centroid of the geometry
If return_all is set to True, will return a list of the H3 that are enclosed by the geometry
Adds a property to the feature properties called “h3_[resolution]” where [resolution] is the level of the S2 cell.
If return_all is set to True, will return a list of the H3 cells that cover the geometry, in a property called “h3_[resolution]_all”.
- Parameters:
- Returns:
middleware to add H3 cell to feature properties
- Return type:
Examples
>>> # Add the H3 cell to the properties of the search response >>> transform = SearchTransform.h3(resolution=10)