Convert Overture Maps transportation data to GMNS networks
Project description
overture2gmns
overture2gmns is an alpha Python package that converts the Overture Maps transportation theme into a GMNS road network. Its user-facing API intentionally mirrors osm2gmns, while its topology engine is designed around Overture's native segment and connector model.
Why a separate converter is needed
Overture differs materially from raw OSM:
- Topology is explicit. A segment contains connector IDs and normalized linear-reference positions.
- Connectors can occur inside a segment. The converter must split a segment at connector positions before creating GMNS links.
- Properties can vary along one segment. Speed, access, surface, level, and related values can be scoped using
between=[start,end]; the converter can split at these boundaries. - Rules can be directional and modal. Overture uses ordered rule lists; the last matching rule determines the value.
- Some modeling attributes remain application defaults. Overture intentionally does not prescribe jurisdiction-specific implied access or implied speed, and the current transportation schema does not directly provide a GMNS-ready lane/capacity model. This package exposes transparent class defaults rather than silently treating them as observed facts.
Installation
pip install -e .
For direct cloud download through Overture's official Python client:
pip install -e ".[download]"
For local GeoParquet files:
pip install -e ".[geoparquet]"
Python API (osm2gmns-style)
import overture2gmns as o2g
net = o2g.getNetFromFile(
"segments.geojson",
"connectors.geojson",
mode_types=("auto", "bike", "walk"), # str or sequence, like osm2gmns
link_types=("motorway", "primary"), # optional Overture class filter
)
o2g.fillLinkAttributesWithDefaultValues(
net,
default_lanes=True, default_lanes_dict={"motorway": 3},
default_speed=True,
default_capacity=True, default_capacity_dict={"primary": 1800},
)
o2g.generateNodeActivityInfo(net)
o2g.consolidateComplexIntersections(net, auto_identify=True, int_buffer=20.0)
o2g.outputNetToCSV(net, "gmns_output")
print(net.number_of_nodes, net.number_of_links)
network_types= is accepted as a backward-compatible alias for mode_types=.
Direct bounding-box access:
net = o2g.getNetFromBBox(
(-111.95, 33.41, -111.92, 33.44),
mode_types=("auto",),
release=None, # latest release
)
o2g.outputNetToCSV(net, "tempe_gmns")
Download-then-convert (the osm2gmns downloadOSMData workflow):
files = o2g.downloadOvertureData((-111.95, 33.41, -111.92, 33.44), "raw_overture")
net = o2g.getNetFromFile(files["segment"], files["connector"], mode_types="auto")
API mapping to osm2gmns
| osm2gmns 1.0.x | overture2gmns | Notes |
|---|---|---|
getNetFromFile(filepath, mode_types, link_types, ...) |
getNetFromFile(segment_file, connector_file, mode_types, link_types, ...) |
Overture ships topology in two feature types |
downloadOSMData(area_id, path) |
downloadOvertureData(bbox, folder) |
Overture is queried by bbox, not relation ID |
fillLinkAttributesWithDefaultValues(net, ...) |
same name, same signature | dicts keyed by Overture road class; speeds in mph |
generateNodeActivityInfo(net, zone_filepath) |
same name, same signature | activity from incident link classes |
consolidateComplexIntersections(net, auto_identify, file, int_buffer) |
same name, same signature | Overture has no signal tag; proximity rule only |
outputNetToCSV(net, output_folder='') |
same name, same signature | adds diagnostics.json |
net.number_of_nodes / net.number_of_links |
same |
Command line
Convert downloaded GeoJSON, GeoJSONSeq, or GeoParquet:
overture2gmns convert \
--segments segments.geojson \
--connectors connectors.geojson \
--modes auto,bike,walk \
--output gmns_output
Download the latest Overture release for a bounding box and convert it:
overture2gmns download \
--bbox -111.95 33.41 -111.92 33.44 \
--modes auto \
--output tempe_gmns
Current outputs
node.csv: GMNS nodes, keyed by integernode_id, preserving Overture connector IDs, plusactivity_type/is_boundary/zone_id/intersection_idwhen generated.link.csv: directed GMNS links with WKT geometry, length (miles), free speed (mph), inferred lanes/capacity, allowed uses, Overture segment/version IDs, linear-reference ranges, and heading.diagnostics.json: skipped records, unresolved conditional rules, and turn restrictions not yet exported.
Only node.csv and link.csv are required for a basic GMNS static network. Extension columns are deliberately retained because GERS/Overture IDs are valuable for conflation and release-to-release tracking.
Implemented conversion logic
- Reads GeoJSON FeatureCollections, GeoJSONSeq, and optional GeoParquet input.
- Optionally reads authoritative connector point features.
- Splits each road segment at interior connectors.
- Splits at boundaries of geometrically scoped properties.
- Reuses a shared GMNS node whenever segments reference the same connector ID.
- Evaluates forward/backward access independently.
- Applies Overture's "last matching rule" rule-list semantics.
- Converts explicit
km/hormphspeed limits to GMNS mph. - Falls back to user-replaceable road-class defaults for implied access, speed, lanes, and capacity.
- Emits one directed GMNS link per allowed heading.
- Filters by Overture road class via
link_types, like osm2gmns's link-type filter.
Important alpha limitations
prohibited_transitionsare detected but not yet translated tomovement.csv.- Temporal rules (
during), user-purpose rules (using), recognized-status rules, and vehicle-dimension rules require scenario context; they are reported rather than flattened incorrectly. - Lane count and capacity are inferred from class defaults and are explicitly marked with source fields.
- Only
subtype=roadis converted; rail and water are planned extensions. - Country/jurisdiction-specific access defaults should replace the generic table for production routing.
- Very large regional extracts will benefit from a streamed Arrow implementation or a compiled geometry/topology core.
Testing
pytest -q
The fixtures verify interior-connector splitting, shared-node reuse, directional access, scoped speed limits, mode/class filtering, default filling, node activity generation, intersection consolidation, and GMNS CSV output.
Licensing and attribution
The package source code is MIT licensed. Overture transportation data is distributed under ODbL and carries upstream attribution requirements. A typical attribution is:
© OpenStreetMap contributors, Overture Maps Foundation
Users remain responsible for complying with the terms applicable to the specific Overture release and derivative database they distribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file overture2gmns-0.1.0.tar.gz.
File metadata
- Download URL: overture2gmns-0.1.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b724e6e95d2c36b14120a902c58336c6b3bb099bd62b6c2959cdc0a148ab8ff6
|
|
| MD5 |
4a1a8747ae36c8ddef4c2c13c27efc87
|
|
| BLAKE2b-256 |
bbb001fd07072d9507cc020845bd67faca4e9ca0e663e6a1b5467486b832c5f4
|
Provenance
The following attestation bundles were made for overture2gmns-0.1.0.tar.gz:
Publisher:
workflow.yml on asu-trans-ai-lab/overture2gmns
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
overture2gmns-0.1.0.tar.gz -
Subject digest:
b724e6e95d2c36b14120a902c58336c6b3bb099bd62b6c2959cdc0a148ab8ff6 - Sigstore transparency entry: 2191365089
- Sigstore integration time:
-
Permalink:
asu-trans-ai-lab/overture2gmns@512c183f64201c1250be65125ba548eaf82cc362 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/asu-trans-ai-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@512c183f64201c1250be65125ba548eaf82cc362 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file overture2gmns-0.1.0-py3-none-any.whl.
File metadata
- Download URL: overture2gmns-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
345fdc3d536e05c4bf6838f2bd4ae469e478565285d6043e30acd8c6a199ae1b
|
|
| MD5 |
d4668ccd94302a91f94d05e3717b99fe
|
|
| BLAKE2b-256 |
cf6022675d9186b472f9244e39ded7125bd50a5d615feb4011cbb3a8732c5eff
|
Provenance
The following attestation bundles were made for overture2gmns-0.1.0-py3-none-any.whl:
Publisher:
workflow.yml on asu-trans-ai-lab/overture2gmns
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
overture2gmns-0.1.0-py3-none-any.whl -
Subject digest:
345fdc3d536e05c4bf6838f2bd4ae469e478565285d6043e30acd8c6a199ae1b - Sigstore transparency entry: 2191365122
- Sigstore integration time:
-
Permalink:
asu-trans-ai-lab/overture2gmns@512c183f64201c1250be65125ba548eaf82cc362 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/asu-trans-ai-lab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@512c183f64201c1250be65125ba548eaf82cc362 -
Trigger Event:
workflow_dispatch
-
Statement type: