openlr-decoder¶
Fast OpenLR location reference decoder for Python.
Decode HERE-encoded OpenLR location references onto OSM-based road networks. Built in Rust with Python bindings via PyO3 for high performance.
Features¶
- Fast: Rust core with parallel batch decoding via Rayon
- Zero-copy data loading: Pass Arrow tables, Polars DataFrames, or PyArrow RecordBatches directly — no serialization overhead
- Cross-provider: Tuned for decoding HERE-encoded OpenLR onto OSM road networks
- Configurable: 14 parameters for scoring weights, tolerances, and search behavior
- Batch-friendly:
decode_batch()returns an Arrow RecordBatch for seamless integration with Polars, Pandas, and DuckDB
Quick Start¶
from openlr_decoder import RoadNetwork, Decoder
network = RoadNetwork.from_parquet("network.parquet")
decoder = Decoder(network)
result = decoder.decode("CwRbWyNG9RpsCQCb/jsboAD/6/+E")
print(result.edge_ids) # [12345, 12346, 12347]
print(result.length) # 542.3
Next Steps¶
- Getting Started — installation, loading data, single and batch decoding
- OpenLR Concepts — background on the OpenLR standard and cross-provider challenges
- Preparing Network Data — parquet schema and data sourcing
- API Reference — complete reference for all classes and functions
- Configuration Guide — tuning the decoder for your use case
- Troubleshooting — common errors and debugging workflow