infra-hex-rs

Crates.ioinfra-hex-rs
lib.rsinfra-hex-rs
version0.1.0
created_at2025-12-29 21:19:03.482415+00
updated_at2025-12-29 21:19:03.482415+00
descriptionFetch UK infrastructure data, aggregate to hex grids in British National Grid
homepage
repositoryhttps://github.com/CHRISCARLON/infra-hex-rs
max_upload_size
id2011462
size151,523
Chris Carlon (CHRISCARLON)

documentation

README

infra-hex-rs

A Rust tool for fetching gas pipeline infrastructure data and aggregating it into H3 inspired hexagonal grids.

This uses a British National Grid implementation of hexagonal grids.

What it does

  1. Fetches pipeline data from Cadent's OpenDataSoft API by bounding box
  2. Converts pipeline geometries (LineStrings) into n3gb hexagon cells at a specified zoom
  3. Aggregates pipeline counts per hexagon
  4. Exports results as GeoParquet files (optional)

The default example fetches gas pipeline infrastructure for North London and outputs a hexagonal summary at zoom level 10.

Features

  • Async parallel API fetching with rate limiting
  • Efficient hex grid processing
  • Apache Arrow-based in-memory processing
  • GeoParquet output for spatial analysis tools like QGIS

Setup

Set your Cadent API key:

export CADENT_API_KEY=your_api_key_here
Commit count: 0

cargo fmt