Train Positioning Library - GNSS track axis projection
Project description
tp-lib Python Bindings
Python bindings for the Train Positioning Library (TP-Lib), providing GNSS track axis projection and train path calculation.
Installation
pip install tp-lib
Usage
Timestamps
Input timestamps may be RFC3339 with an explicit offset (e.g.
2025-12-09T14:30:00+01:00 or 2025-12-09T14:30:00Z) or naive ISO 8601
(e.g. 2025-12-09T14:30:00, 2025-12-09 14:30:00). Naive values are
interpreted in the host's local timezone. All timestamps returned by
the library are RFC3339 strings carrying an explicit timezone offset.
from tp_lib import project_gnss, ProjectionConfig
config = ProjectionConfig(max_search_radius_meters=1000.0)
result = project_gnss(gnss_positions, network, config)
Automatic RINF Topology Retrieval
If you omit network (or pass None), the library downloads a bounding-box
subset of the ERA RINF topology on demand:
from tp_lib import project_gnss, RinfRetrievalOptions
result = project_gnss(
gnss_positions=gnss_positions,
network=None,
rinf_options=RinfRetrievalOptions(
endpoint_url="https://graph.data.era.europa.eu/repositories/rinf-plus",
buffer_meters=1000.0,
),
)
Errors are raised as built-in exceptions (ValueError, RuntimeError) when
retrieval cannot satisfy the request. The same overload exists for
calculate_train_path.
The library may raise:
ValueErrorfor invalid input (e.g., malformed GNSS data or invalid coordinates)RuntimeErrorfor operational failures (e.g., RINF topology retrieval errors)
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 Distributions
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 tp_lib-0.0.6.tar.gz.
File metadata
- Download URL: tp_lib-0.0.6.tar.gz
- Upload date:
- Size: 236.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e11830551b5ac77cc64c64c8b3a8f298dc559d68f3be0e14cbb24851c3a7e38
|
|
| MD5 |
d1b77968355417cd56aec9c63e5daf60
|
|
| BLAKE2b-256 |
7f68297ae3541d4415665d97c1473edbb6c3f85f46d4a4a72d4af42330fea1ac
|
Provenance
The following attestation bundles were made for tp_lib-0.0.6.tar.gz:
Publisher:
publish-pypi.yml on Matdata-eu/tp-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tp_lib-0.0.6.tar.gz -
Subject digest:
7e11830551b5ac77cc64c64c8b3a8f298dc559d68f3be0e14cbb24851c3a7e38 - Sigstore transparency entry: 1630827412
- Sigstore integration time:
-
Permalink:
Matdata-eu/tp-lib@48633bb3e5aebe02d0fa0cc3410499842ecd71c8 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/Matdata-eu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@48633bb3e5aebe02d0fa0cc3410499842ecd71c8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tp_lib-0.0.6-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: tp_lib-0.0.6-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c740d02b34508d53ee848d75870be6b7932a35b534467deb9fdf457c24acc466
|
|
| MD5 |
07bfdaf63bcbfddc132cf4fb8ff02013
|
|
| BLAKE2b-256 |
508229d3172c24e4942875f68d5f61286afd41df01c1c178e4e8c3f43752d250
|
Provenance
The following attestation bundles were made for tp_lib-0.0.6-cp312-cp312-win_amd64.whl:
Publisher:
publish-pypi.yml on Matdata-eu/tp-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tp_lib-0.0.6-cp312-cp312-win_amd64.whl -
Subject digest:
c740d02b34508d53ee848d75870be6b7932a35b534467deb9fdf457c24acc466 - Sigstore transparency entry: 1630827462
- Sigstore integration time:
-
Permalink:
Matdata-eu/tp-lib@48633bb3e5aebe02d0fa0cc3410499842ecd71c8 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/Matdata-eu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@48633bb3e5aebe02d0fa0cc3410499842ecd71c8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tp_lib-0.0.6-cp312-cp312-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: tp_lib-0.0.6-cp312-cp312-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 7.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09b968c276e31ffb55cb8d48e29c39b78375f072fa2820a4e711861f5d0d2964
|
|
| MD5 |
276b023f451614b20466e35eaff1a140
|
|
| BLAKE2b-256 |
2cffd06431f49cfbc7813d48abbcb43963edb0d772cb40404b01c33bdfba1d9c
|
Provenance
The following attestation bundles were made for tp_lib-0.0.6-cp312-cp312-manylinux_2_35_x86_64.whl:
Publisher:
publish-pypi.yml on Matdata-eu/tp-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tp_lib-0.0.6-cp312-cp312-manylinux_2_35_x86_64.whl -
Subject digest:
09b968c276e31ffb55cb8d48e29c39b78375f072fa2820a4e711861f5d0d2964 - Sigstore transparency entry: 1630827439
- Sigstore integration time:
-
Permalink:
Matdata-eu/tp-lib@48633bb3e5aebe02d0fa0cc3410499842ecd71c8 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/Matdata-eu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@48633bb3e5aebe02d0fa0cc3410499842ecd71c8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tp_lib-0.0.6-cp312-cp312-macosx_11_0_arm64.whl.
File metadata
- Download URL: tp_lib-0.0.6-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
367a6f799fd74e508167f7a255faf700db157ea42f9016a740ee71c7c37c98b4
|
|
| MD5 |
ffc59f5e606f919c6df27a5530f837e2
|
|
| BLAKE2b-256 |
f1896cccdc2efd752ad9877aa81d20fa40bd20331326cb1ac10a7ed333f91f57
|
Provenance
The following attestation bundles were made for tp_lib-0.0.6-cp312-cp312-macosx_11_0_arm64.whl:
Publisher:
publish-pypi.yml on Matdata-eu/tp-lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tp_lib-0.0.6-cp312-cp312-macosx_11_0_arm64.whl -
Subject digest:
367a6f799fd74e508167f7a255faf700db157ea42f9016a740ee71c7c37c98b4 - Sigstore transparency entry: 1630827423
- Sigstore integration time:
-
Permalink:
Matdata-eu/tp-lib@48633bb3e5aebe02d0fa0cc3410499842ecd71c8 -
Branch / Tag:
refs/tags/v0.0.6 - Owner: https://github.com/Matdata-eu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@48633bb3e5aebe02d0fa0cc3410499842ecd71c8 -
Trigger Event:
release
-
Statement type: