Add your description here
Project description
CrossNM
Python package for downloading, and caching network rail geometry models as GeoPandas GeoDataFrames.
What this package provides
CrossNM has two network model views:
-
Full model
-
Simplified model: produces a single-line representation of the network and is not split by ELR.
Installation
pip install crossnm
Quick start
from crossnm import FullModel, SimplifiedModel
tracks_gdf = FullModel().download()
simplified_tracks_gdf = SimplifiedModel().download()
Cache Behaviour
When available, FullModel().download will load relevant geometries from a local cache. This is created when the geometry was last downloaded.
The GeoDataFrames are stored as .pkl files alongside cache information as a .json. The cache .json contains information on the life-span of the cache as a unix timestamp, as well as when the geometry was last cached.
On loading the geometry, the cache information is inspected, and if the cache is out of date, the geometry is replaced with a download from the google storage bucket. The cache information is then updated with the new time of cacheing.
Logs
If logs are not required, pass logs=False into the constructor of the loader.
Project details
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 crossnm-0.1.1.tar.gz.
File metadata
- Download URL: crossnm-0.1.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
462685624c626670afb969ffebc82f4f9b9a43f30437813ea6c7f7e6c08b9c74
|
|
| MD5 |
a7452e2deb499a655f9e9056a722263e
|
|
| BLAKE2b-256 |
a81dc78d406249d45ef4b67a023f3d73b1371fcdf60cf5a57321ca1105bfb7a5
|
File details
Details for the file crossnm-0.1.1-py3-none-any.whl.
File metadata
- Download URL: crossnm-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2c55e06a4ca7cb4dc4ee8a1c537d6220b57648cf1385bf0eefbecce043a38ae
|
|
| MD5 |
34740528a5a76e0a3582b4c54475e4ee
|
|
| BLAKE2b-256 |
f3c697d8b61c81266d38c55cd6e5195237ef5ebd1d133d9655cdd13f2ed21426
|