osm-topology

Construct and validate GF(3)-colored road topologies from OpenStreetMap data.

60|13|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/plurigrid/asi --skill osm-topology
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: osm-topology
Source: https://github.com/plurigrid/asi/tree/main/skills/osm-topology
Command: npx skills add https://github.com/plurigrid/asi --skill osm-topology

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenStreetMap graph analysis with GF(3) coloring for routing, validation, and topological queries.

Core Features & Use Cases

  • OSM data modeling (Nodes, Ways, Relations) with topology fields
  • DuckDB integration for OSM extraction and analysis
  • Graph validation and gf3-balance checks
  • Path routing with GF(3) coloring

Quick Start

Load OSM data, extract to a colored graph, and run a routing query:

  • osm_to_colored_graph over Overpass/Parquet data

Frequently Asked Questions about osm-topology

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a colored topology from OpenStreetMap data for routing?▼

Extract road networks from OSM data using DuckDB's OSM extension, apply GF(3) coloring to classify edges into three balanced groups, and validate connectivity and edge properties. This produces a routing-ready graph with topological constraints satisfied.

What is GF(3) coloring and why use it for OpenStreetMap graphs?▼

GF(3) coloring assigns one of three trit states to graph edges, balancing network structure for routing algorithms. It ensures symmetric edge properties and prevents algorithmic failures on unbalanced road networks.

Can I use DuckDB to analyze OSM topology and validate graphs?▼

Yes. DuckDB's OSM extension ingests PBF or Parquet data, extracts nodes and ways with topology fields, runs validation checks for dead-ends and self-loops, and outputs edge attributes compatible with routing queries.

How do I check for topological errors like duplicate edges and disconnected segments in road networks?▼

Run validation checks on the colored graph to detect dead-ends, self-loops, duplicate edges, and connectivity gaps. DuckDB queries against the topology model identify and flag these issues before routing.

What input formats does OpenStreetMap topology support?▼

Ingest OSM data as PBF (Protocol Buffer Format) raw exports or pre-processed Parquet tables. Both formats integrate with DuckDB for extraction and graph construction.

When should I validate graph topology before running routing queries?▼

Always validate before routing to catch dead-ends, disconnected nodes, and malformed edges that degrade pathfinding. Topology checks prevent query failures and ensure routing correctness across the network.