Ctrl + K
DocumentationLog inGet started

tessl/pypi-h3

tessl install tessl/pypi-h3@4.3.0

Python 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%

task.mdevals/scenario-4/

H3 Vertex Toolkit

Utility module for exposing vertex identifiers and coordinates for H3 cells so downstream code can reason about cell corners rather than entire boundaries.

Capabilities

Enumerate vertices for a cell

  • Given the cell index for latitude 37.7749 and longitude -122.4194 at resolution 9, return six unique vertex identifiers ordered along the cell boundary; consecutive identifiers in the list must represent neighboring vertices on that boundary. @test
  • Passing a malformed index string such as "not-a-cell" raises a ValueError. @test

Convert vertices to coordinates

  • Using the vertex identifiers from the San Francisco cell above, return a list of (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

Aggregate shared vertices

  • Given the same base cell and the adjacent cell one hex-step north at resolution 9 (the neighbor with the higher latitude center), produce a mapping of vertex identifier to coordinate tuple (rounded to 6 decimals) containing exactly 10 unique entries; exactly two vertex identifiers must appear in both cells and share identical coordinates in the mapping. @test

Implementation

@generates

API

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."""

Dependencies { .dependencies }

h3 { .dependency }

Provides vertex listing, vertex validation, and vertex-to-lat/lng conversion for H3 indexes.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/h3@4.3.x
tile.json