Skip to content

H3 Spatial Indexing

Platform Users — Engineers & Low-code Ops Users (ORA / Panel Builder) OR Platform ORA — AI Planning Interface Agent Workflows Plan Visualisation ADK Integration SDK UI — Frontend Shell FDK Architecture Low code Config-driven DDK Schema Definition Code Generator Generated Server MDK WEM DAL Experiment Manager Nexus Deployment Control Live Monitoring Registry Browser SCDK Source Control Pipeline Mgmt Azure DevOps deploys ↓ SDK API — GraphQL Federation Gateway Federation Gateway Component Resolvers Auth & Licensing Plugins: gql-autogeneration Migrator Helm KinD Boilerplate GenAI ··· Microservices — Domain IP Services Data Pipeline Core Platform Metrics & Analytics Spatial & Geo Simulation Event Detection Camera & Device Fire & Resource Opt. Satellite Modelling ↓ Nexus deploys Deployed OR Applications Rail Ops Dashboard Mine Mgmt Dashboard Port Ops Dashboard ··· FDK-built · DDK-backed · MDK-powered · deployed via Nexus ↑ Application Users — Operations Teams (shift managers, analysts, planners)

Overview

The H3 Spatial Indexing service is a geospatial utility microservice providing hexagonal spatial indexing and polygon operations for the OR platform. Developed for an OR Alpha project, it serves as the spatial computation backend that enables grid-based spatial analysis, zone assignment, and multi-resolution aggregation for fire risk mapping and location intelligence.

The service converts between geographic coordinates, hexagonal grid cells, and polygon boundaries — enabling the Fire Spread Modelling service to work with real-world terrain data indexed at hexagonal resolution levels.

Architecture

The H3 Spatial Indexing service is built as a lightweight web service that integrates with the OR platform through standardized data interfaces. It provides HTTP endpoints for spatial operations and follows platform conventions for health monitoring and API documentation.

Platform Integration

The service integrates seamlessly with the OR platform's workflow orchestration system, allowing spatial operations to be composed into larger computational pipelines. It supports health monitoring for deployment management and provides interactive API documentation for developers and integrators.

Capabilities

Coordinate to Hexagon Conversion

Convert between geographic coordinates and hexagonal cell indices at any resolution level (0–15).

Geographic Coordinates to Hexagonal Cells

Converts a geographic coordinate to its enclosing hexagonal grid cell.

EndpointInputParametersOutput
POST /latlon_to_h3latitude, longituderesolution (0–15, default: 9)h3_index, resolution, input coordinates
POST /latlon_to_h3_bulkArray of coordinate pairsresolution (0–15, default: 9)Array of hexagon results (h3_index, lat, lon), total_converted

Hexagonal Cells to Geographic Coordinates

Converts a hexagonal cell index back to its hexagon centre-point coordinates.

EndpointInputParametersOutput
POST /h3_to_latlonh3_indexvalidate_h3_index (default: true)latitude, longitude, resolution
POST /h3_to_latlon_bulkArray of hexagon indicesvalidate_h3_indices, skip_invalidArray of coordinate results, total_converted

Hexagonal Hierarchy Navigation

Navigate between resolution levels in the hexagonal hierarchy. Each parent cell contains approximately 7 children at the next finer resolution.

Parent to Children (Zoom In)

Expands a parent hexagonal cell to all child cells at a higher (finer) resolution.

EndpointInputParametersOutput
POST /h3_parent_to_childrenparent_h3_index, child_resolutionvalidate_h3_index, include_parent_info (area, coordinates)child_h3_indices, total_children, resolution_difference, optional parent_info
POST /h3_parent_to_children_bulkArray of parent indices, child_resolutionvalidate_h3_indices, skip_invalid, deduplicate_childrenPer-parent results, all child indices (deduplicated), duplicates_removed

The bulk variant deduplicates overlapping children from adjacent parents — essential when expanding contiguous regions.

Child to Parent (Zoom Out)

Maps a child hexagonal cell to its parent at a lower (coarser) resolution. Each child has exactly one parent at any given resolution.

EndpointInputParametersOutput
POST /h3_child_to_parentchild_h3_index, parent_resolutionvalidate_h3_index, include_child_infoparent_h3_index, parent_latitude, parent_longitude, resolution_difference
POST /h3_child_to_parent_bulkArray of child indices, parent_resolutionvalidate_h3_indices, skip_invalidPer-child results, unique_parents (deduplicated), total_unique_parents

The bulk variant identifies unique parents — siblings that share the same parent are naturally deduplicated.

Polygon Operations

Polygon Intersection (Zone Assignment)

Determines which polygon from a GeoJSON FeatureCollection contains each point, using a three-tier matching strategy:

  1. Exact match — point is geometrically inside a polygon
  2. Buffer match — point is within a configurable buffer distance of a polygon boundary
  3. Nearest match — finds the closest polygon within a maximum search distance

The service uses geospatial processing libraries with automatic geometry validation and repair, supporting standard geographic coordinate systems.

EndpointInputParameters
POST /polygon_intersectGeoJSON FeatureCollection (polygons with id), array of PointWithId (id, lat, lon)buffer_distance_meters (default: 5000), find_nearest_if_no_match (default: true), max_distance_for_nearest (default: 50000m)

Response per point: intersecting_polygon_id, polygon_properties, distance_to_polygon (0 if inside, metres if buffer/nearest), match_type (exact / buffer / nearest / none).

Polygon to Hexagonal Grid (Grid Coverage)

Converts polygon boundaries to hexagonal grid coverage. Supports Polygon, MultiPolygon, Feature, and FeatureCollection inputs.

For MultiPolygon and FeatureCollection inputs, each polygon is processed separately and the hexagonal cell sets are combined. Invalid geometries are automatically repaired using standard geospatial techniques.

EndpointInputParametersOutput
POST /polygon_to_h3GeoJSON Polygon, MultiPolygon, Feature, or FeatureCollectionresolution (0–15, default: 5), combine_all_features (default: true)h3_indices, total_hexagons, area_info (hexagon area, total area, geometry type), features_processed

Hexagonal Resolution Reference

ResolutionHexagon AreaTypical Use
0–34,250–100,000 km²Continental / country scale
4–67–1,000 km²State / province scale
7–90.1–5 km²City / neighbourhood scale
10–1215 m²–45,000 m²Street / building scale
13–150.9–9 m²Precise / indoor scale

The Fire Spread Modelling service uses resolution 4 (approximately 25 km² per hexagon) for national-scale terrain indexing in the terrain reference database table.

API Endpoints

EndpointMethodCategoryPurpose
/liveGETHealthLiveness probe
/readyGETHealthReadiness probe
/latlon_to_h3POSTGeocodingSingle coordinate → H3 index
/latlon_to_h3_bulkPOSTGeocodingBatch coordinates → H3 indices
/h3_to_latlonPOSTGeocodingSingle H3 index → centre lat/lon
/h3_to_latlon_bulkPOSTGeocodingBatch H3 indices → coordinates
/h3_parent_to_childrenPOSTH3 HierarchySingle parent → all child cells
/h3_parent_to_children_bulkPOSTH3 HierarchyBatch parents → children with dedup
/h3_child_to_parentPOSTH3 HierarchySingle child → parent cell
/h3_child_to_parent_bulkPOSTH3 HierarchyBatch children → parents with unique parent identification
/polygon_intersectPOSTGeospatialPoint-in-polygon zone assignment
/polygon_to_h3POSTGeospatialPolygon boundary → H3 grid coverage

Deployment

The H3 Spatial Indexing service is deployed as a containerized microservice within the OR platform infrastructure. It follows standard cloud deployment practices with automated build and test pipelines, ensuring reliable delivery of spatial computation capabilities to the platform.

User documentation for Optimal Reality