GEO INFER SPACE

From ActiveInferenceInstitute/GEO-INFER · View interactive version

GEO INFER SPACE is an AI agent skill from the GitHub repository ActiveInferenceInstitute/GEO-INFER. H3 hexagonal spatial indexing and multi-backend spatial operations. Use when working with H3 cells, spatial indexing, coordinate systems, raster/vector operations, or any spatial backend dispatch (H3, SRAI).

How to use this skill

Skill file

GEO-INFER-SPACE

Instructions

Core Capabilities

and deterministic aggregation for ordered H3 resolutions

Key Imports

from geo_infer_space.backends.h3 import H3Backend
from geo_infer_space import GISManager, H3StateSpace, align_h3_observations
from geo_infer_space.core import (
    GeometricOperationsInterface,
    SpatialIndexingInterface,
)
from geo_infer_space.nested import NestedH3Grid

H3 v4.5 API (Critical)

import h3
# CORRECT (v4):
cell = h3.latlng_to_cell(lat, lng, resolution)
lat, lng = h3.cell_to_latlng(cell)
neighbors = h3.grid_disk(cell, k)

# Pre-v4 coordinate and neighborhood spellings are unsupported. The repository
# H3 contract validator rejects them in runtime source.

Examples

from geo_infer_space.backends.h3 import H3Backend

backend = H3Backend()

# Index a point to an H3 cell at resolution 7
cell = backend.latlng_to_cell(45.5231, -122.6765, resolution=7)
print(f"H3 cell: {cell}")

# Get neighbors within 2 grid rings (excludes the center cell)
neighbors = backend.get_cells_within_radius(cell, k=2)
print(f"Neighbors (k=2): {len(neighbors)} cells")

# Convert a polygon region to H3 cells
from shapely.geometry import box
region = box(-122.8, 45.4, -122.5, 45.6)
cells = backend.polygon_to_cells(region, resolution=8)
print(f"Region coverage: {len(cells)} cells")
from geo_infer_space.nested import NestedH3Grid

grid = NestedH3Grid("sf_nested")
hierarchy = grid.build_h3_hierarchy_from_cells(
    ["89283082803ffff"],
    resolutions=[7, 8, 9],
)

assert hierarchy["validation"]["is_valid"]
assert hierarchy["validation"]["orphan_count"] == 0
from geo_infer_space import GISManager

gis = GISManager()
x, y = gis.transform_coordinates(
    (-122.6, 45.5),
    from_crs="EPSG:4326",
    to_crs="EPSG:32610",
)
print(f"UTM Zone 10N: ({x:.0f}, {y:.0f})")

Agent interfaces

Use uv run --frozen geo-infer catalog SPACE to discover public source

APIs, then geo-infer describe before calling a selected target. Scripts use

geo_infer_api.agent_runtime.AgentSession; the optional stdio MCP server is

geo-infer-mcp. See requests, native objects and composition.

The adapter retains this module's dependencies and authorization requirements.

Guidelines

parent_child_map, child_parent_map, same_level_neighbors, and

validation["orphan_count"] == 0 before handing cells to ACT.

uv run pytest GEO-INFER-SPACE/tests/unit/test_nested_h3_contract.py -q

and uv run python GEO-INFER-TEST/run_unified_tests.py --module SPACE

Integrations

propagation, bounded expansion, configuration ownership and statistical

reference assumptions.

the real study_area_km2 to request a spatial-randomness reference score.

constructor h3_resolution overrides the configuration default.

missing-value preprocessing before fitting an estimator.

columns and ordered UTC timestamps. It rejects unknown cells/times and

duplicate pairs; absent observations stay NaN.

space-time interpolation is SpatioTemporalAnalyzer.interpolate_spatiotemporal

with softened inverse-distance weights, rather than a kriging estimator.

axes, missingness, coordinate order and model schedule requirements.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.