Expand description
Python bindings for tp-core
This module provides Python FFI via PyO3 for the GNSS track axis projection library.
§Example Usage (Python)
from tp_lib import project_gnss, ProjectionConfig
# Project GNSS positions onto railway network
results = project_gnss(
gnss_file="positions.csv",
gnss_crs="EPSG:4326",
network_file="network.geojson",
network_crs="EPSG:4326",
target_crs="EPSG:31370", # Belgian Lambert 72
config=ProjectionConfig()
)
for result in results:
print(f"Position at {result.measure_meters}m on {result.netelement_id}")Structs§
- Projected
Position - Python-exposed projected position result
- Projection
Config - Python-exposed projection configuration