Python bindings for H3, a hierarchical hexagonal geospatial indexing system
84
Utility module for exposing vertex identifiers and coordinates for H3 cells so downstream code can reason about cell corners rather than entire boundaries.
(latitude, longitude) tuples rounded to 6 decimal places, preserving the input order; the first tuple should place the point northwest of the cell center (latitude between 37.775 and 37.776, longitude between -122.420 and -122.419). @test@generates
from typing import Iterable, Sequence, Tuple, Dict, List
def cell_vertices(cell: str) -> List[str]:
"""Return the ordered vertex identifiers for a cell index; raise ValueError on invalid input."""
def vertices_to_coordinates(vertices: Sequence[str]) -> List[Tuple[float, float]]:
"""Convert each vertex identifier to a (lat, lng) tuple in degrees, rounded to 6 decimals."""
def shared_vertex_map(cells: Sequence[str]) -> Dict[str, Tuple[float, float]]:
"""Return unique vertex identifiers across the provided cells mapped to their coordinates."""Provides vertex listing, vertex validation, and vertex-to-lat/lng conversion for H3 indexes.
Install with Tessl CLI
npx tessl i tessl/pypi-h3docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10