Skip to main content

Math utilities for NDS.Live

Project description

ndslive-math

Python version of ndsmath, math utilities for NDS.Live.

Installation

pip install ndslive-math

Development

For development, install in editable mode with the version workaround since the Python package is in a subdirectory:

SETUPTOOLS_SCM_PRETEND_VERSION=$(cd .. && python -m setuptools_scm) pip install --config-settings editable-mode=strict -e .

This workaround is needed because the git repository is at the parent level, not in the python/ directory.

Usage

from ndslive.math import Wgs84, PackedTileId, MortonCode

# Create WGS84 coordinates
coord = Wgs84(lon=13.404954, lat=52.520008)

# Convert to NDS coordinates
x_nds, y_nds = coord.to_nds_coordinates()

# Create packed tile ID
tile = PackedTileId(level=13, x=4567, y=2345)

# Create Morton code
morton = MortonCode.from_nds_coordinates(x_nds, y_nds)

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

ndslive_math-1.0.0.tar.gz (42.3 kB view details)

Uploaded Source

Built Distribution

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

ndslive_math-1.0.0-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file ndslive_math-1.0.0.tar.gz.

File metadata

  • Download URL: ndslive_math-1.0.0.tar.gz
  • Upload date:
  • Size: 42.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ndslive_math-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a9ffbb1984a53feec733160a35072f926d37d2a1bdbb6321fd691f9b592b3e0b
MD5 656ab0b1323daa10524bcf6d445432f5
BLAKE2b-256 a4fadc115e5bf709cc9c4bd9b01071d91a46068af543a5737456fcac01bb1bcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndslive_math-1.0.0.tar.gz:

Publisher: ci.yml on ndsev/ndslive-math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ndslive_math-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ndslive_math-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ndslive_math-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74f651dadaa797716b24794077a3ce32d73c7d04b9d6e8071a009488ca1c5474
MD5 fc1e8b0467f821ec1adf6997f2d7c4b7
BLAKE2b-256 1cc2cb99c4c4397dbc87c7f050aba82d637aaf410e34c72c0e961f3bb8471976

See more details on using hashes here.

Provenance

The following attestation bundles were made for ndslive_math-1.0.0-py3-none-any.whl:

Publisher: ci.yml on ndsev/ndslive-math

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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