graph-normalizer
A JavaScript module that turns OpenStreetMap ways, given as GeoJSON LineStrings, into a normalized graph of intersections and ways. It covers steps like merging and splitting lines.
Pick a small issue you can reproduce, then fix it with your AI coding agent.
Share on XLicense: BSD-2-Clause
Overview
graph-normalizer is a JavaScript module that works on an array of GeoJSON LineStrings representing OpenStreetMap ways. It applies standard graph normalization steps, such as merging edges between intersections and splitting edges that cross intersections, so the ways form a clean graph of intersections and ways. The ids given to ways in the normalized graph are deterministic and reproducible. It exposes splitWays and mergeWays functions and includes tests and a benchmark script.
Key features
- splitWays splits ways that pass through an intersection
- mergeWays joins ways that share a non-intersection node
- Deterministic, reproducible way ids
- Includes tests and a benchmark script
Best for
Developers preparing OSM road geometry for graph-based work who need consistent ids. Input must be GeoJSON LineStrings.
- Upstream
- mapbox/graph-normalizer
- Fork on GitHub
- Guo-astro/graph-normalizer
- Upstream stars
- 12
- Category
- Maps and geospatial
- Language
- JavaScript
- License
- BSD-2-Clause
- Forked
- 2020-11-01
- Sync status
- In syncLast synced 2026-11-08
More in Maps and geospatial
An interactive atlas for exploring Chinese history from 403 BCE to the present. Move through historical periods to see territorial changes, locate places, and connect them with historical events and poetry.
Forked 2026-10-21Last synced 2026-10-25License: GPL-3.0Maps and geospatialGitHub
A Go terminal map viewer and journey planner for recorded activities and planned routes. Inspect tracks, elevation, and playback offline, or use Mapbox for place search and road routing.
Forked 2026-10-19Last synced 2026-11-08License: MITMaps and geospatialGitHub
GeoLibre is a GIS for visualizing and analyzing geospatial data across browser, desktop, mobile, and notebooks. It keeps work local with browser geoprocessing tools.
Forked 2026-10-07Last synced 2026-11-08License: MITMaps and geospatialGitHub
An open source command line toolkit that turns drone, balloon or kite photos into maps, point clouds, 3D models and elevation models. Used for aerial mapping and surveying.
Forked 2026-06-09Last synced 2026-11-08License: AGPL-3.0Maps and geospatialGitHub