tessl install tessl/pypi-h3@4.3.0Python bindings for H3, a hierarchical hexagonal geospatial indexing system
Agent Success
Agent success rate when using this tile
84%
Improvement
Agent success rate improvement when using this tile compared to baseline
0.95x
Baseline
Agent success rate without this tile
88%
Transform user-supplied latitude/longitude rings into the library's native polygon containers and back to GeoJSON while preserving holes and multi-shape structure.
build_shape returns an object exposing __geo_interface__ whose geometry reports type Polygon with two rings; output coordinates are [lng, lat] and both rings are closed with point counts matching the inputs (plus the closing point). @test__geo_interface__ type MultiPolygon where polygon order is preserved and each ring remains closed and intact. @testMultiPolygon with two triangles to a native shape via from_geojson then back via to_geojson returns a GeoJSON dict identical in geometry type and coordinate sequences to the original (respecting [lng, lat] ordering). @testValueError (or equivalent library error) without producing a shape. @test@generates
def build_shape(outer: list[tuple[float, float]], holes: list[list[tuple[float, float]]]] | None = None):
"""Create a native polygon shape from an outer ring and optional hole rings; returns an object exposing __geo_interface__."""
def combine_shapes(polygons: list) -> object:
"""Combine multiple polygon-like objects into a native multi-shape that exposes __geo_interface__ and preserves polygon order."""
def to_geojson(shape: object) -> dict:
"""Convert a native polygon or multi-shape into a GeoJSON-like dictionary with closed rings in [lng, lat] order."""
def from_geojson(geojson: dict) -> object:
"""Convert a GeoJSON Polygon or MultiPolygon dictionary into a native shape exposing __geo_interface__; rejects unsupported types."""Provides geospatial containers and GeoJSON interoperability.