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, both of which use "EPSG: 27700" (https://epsg.io/27700) as a coordinate reference system:

  • 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(hasLogs=False).download() # Entire network model loaded, logs are suppressed

subsection_gdf = FullModel().download_many(["AAV","GAE"]) # Subset of ELRs are selected from Entire network model

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.2.tar.gz (3.9 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.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: crossnm-0.2.2.tar.gz
  • Upload date:
  • Size: 3.9 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.2.tar.gz
Algorithm Hash digest
SHA256 f0194e4fa02bd7ed5ea7d172412eeef83dd344b6804e281432e24bce6c9ddf53
MD5 a2af1c097c5e2d51b54602e35c8310e6
BLAKE2b-256 0c28746d15382312b829d30c1a4f629ddb5d9d2eec6e0795212c6bbf985534cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crossnm-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7f3c74b889a08f2230e3d668d37b0197513b1ab00009baf3dffb05f6e1eb4aa
MD5 38062da5223b001c514d43a27cd91dd8
BLAKE2b-256 c5559530d917accaee89000f944dd636091df87d61e18a6476f3624a2e2ca0d4

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