Skip to content
Back to skills

GEO INFER SPACE

ASecurity

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

  • 17 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 1, 2026
datapythongoapibackend

Works with

  • api

Security analysis

A100/100

Pro scans all 19 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add ActiveInferenceInstitute/GEO-INFER --skill GEO-INFER-SPACE --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of GEO INFER SPACE?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for GEO INFER SPACE
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/activeinferenceinstitute-geo-infer-space/badge)](https://www.skillsdirectory.com/skills/activeinferenceinstitute-geo-infer-space)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: geo-infer-space
description: 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).
prerequisites:
  required:
    - geo-infer-math
  recommended:
    - geo-infer-data
difficulty: intermediate
estimated_time: 45min
examples_dir: ../GEO-INFER-EXAMPLES/examples/
---

# GEO-INFER-SPACE

## Instructions

### Core Capabilities

- **H3 v4.5 indexing**: Cell operations, hierarchical resolution, grid-disk neighborhoods
- **Nested H3 hierarchies**: Parent/child closure, same-resolution adjacency,
  and deterministic aggregation for ordered H3 resolutions
- **Backend dispatch**: Interface pattern for H3 and SRAI backends
- **Coordinate systems**: CRS transformations, EPSG management
- **Spatial operations**: Buffers, intersections, unions, containment
- **Visualization**: Choropleth maps, heatmaps, spatial dashboards

### Key Imports

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

### H3 v4.5 API (Critical)

```python
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

```python
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")
```

```python
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
```

```python
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})")
```

## Guidelines

- Always use H3 v4 API — zero legacy calls allowed
- Runtime and dependency metadata must use real `h3>=4.5.0,<5`.
- Backend-agnostic: use the dispatcher pattern, not direct H3 calls
- For nested H3, construct hierarchies through `NestedH3Grid`; validate
  `parent_child_map`, `child_parent_map`, `same_level_neighbors`, and
  `validation["orphan_count"] == 0` before handing cells to ACT.
- EPSG:4326 (WGS84) is the default CRS
- Test:
  `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

- **MATH** → Spatial weights for statistics
- **TIME** → Spatio-temporal analysis
- **DATA** → Spatial indexing of datasets
- **PLACE** → Boundary tessellation with H3
- Nearly every module depends on SPACE for geographic indexing

Files in this skill

  • AGENTS.md2.3 KB
  • README.md2.6 KB
  • SKILL.md3.4 KB
  • demo_all_methods.py6.9 KB
  • docs/AGENTS.md1.4 KB
  • docs/CLI_TOOLS.md426 B
  • docs/CROSS_MODULE_COMPOSITION.md5.4 KB
  • docs/H3_DATASET_INTEGRATION_GUIDE.md5.8 KB
  • docs/H3_DEMO_README.md693 B
  • docs/H3_MODULE_CONFIGURATION_GUIDE.md1.1 KB
  • docs/H3_V4_MIGRATION_GUIDE.md914 B
  • docs/README.md1.1 KB
  • docs/TESTING.md536 B
  • docs/api_schema.yaml26.6 KB
  • docs/h3_advanced_methods.md778 B
  • docs/references/AGENTS.md1.2 KB
  • docs/references/README.md962 B
  • examples/AGENTS.md1.3 KB
  • examples/README.md2.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.