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-1/

Directed Edge Toolkit

Utilities for building and inspecting directional links between neighboring hexagonal cells.

Capabilities

Build directed edges from adjacent cells

  • Given an origin cell and three neighbor cells from the same resolution, returns three directed edge identifiers in the input order; each edge connects the origin to the corresponding destination. @test
  • If any destination is not an immediate neighbor of the origin, raises ValueError and yields no edges. @test

Map edges back to endpoints

  • Given two directed edges built from an origin to different neighbors, returns pairs of origin/destination cells matching each edge in order. @test

Edge boundaries follow direction

  • Given a directed edge and the reverse edge between the same two cells, returns boundary coordinates where the first tuple aligns with the origin side and reversing the edge flips the boundary order. @test

Implementation

@generates

API

from typing import List, Tuple

Cell = str
LatLng = Tuple[float, float]
Boundary = Tuple[LatLng, ...]

def build_directed_edges(origin: Cell, destinations: List[Cell]) -> List[str]:
    """Return directed edge identifiers from origin to each destination, validating adjacency and resolution consistency."""

def map_edge_endpoints(edges: List[str]) -> List[Tuple[Cell, Cell]]:
    """Return origin/destination tuples for each edge in input order."""

def edge_boundaries(edges: List[str]) -> List[Boundary]:
    """Return boundary coordinate tuples per edge, ordered from origin toward destination."""

Dependencies { .dependencies }

h3 { .dependency }

Provides directed-edge construction, adjacency checks, endpoint extraction, and boundary coordinates for hexagonal cells.

Version

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