Skip to main content

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()

subsection_gdf = FullModel().download_many(["AAV","GAE"])

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 hasLogs=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

crossnm-0.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crossnm-0.2.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file crossnm-0.2.0.tar.gz.

File metadata

  • Download URL: crossnm-0.2.0.tar.gz
  • Upload date:
  • Size: 3.8 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

Hashes for crossnm-0.2.0.tar.gz
Algorithm Hash digest
SHA256 46ab1704e5a964b082245b88f64a649f14f00831e4b4239c1343bc519e2023a2
MD5 66a049136bdd73056ccb62338ff28485
BLAKE2b-256 baa69ae64952182cce5f7411938b088c16eb992c1367e22c04c18652a9c16cda

See more details on using hashes here.

File details

Details for the file crossnm-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: crossnm-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 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

Hashes for crossnm-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 973e1d6336b9229657d76153d4f35b574238a3f96dcad9b96ddddc9489b717fd
MD5 e0e3f3e9e8a1be6f2975cfb906ad8c79
BLAKE2b-256 9f1ce5c9fe0d2f32778c932c7034599cdb131d6805fa54cb335114a55859a1ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page