Skip to main content

pytileproj

tests codecov pypi docs

A python package for working with projected tiling systems.

Projected tiling systems define a tiling scheme for multiple levels (tiling or zoom levels) in a certain projection. The whole concept can be disentangled into the following components:

  • projection: In pytileproj, a projection is represented via a CRS definition (EPSG, PROJ4, WKT, ...) and a projection zone defining the validity of coordinates (optional).
  • tiling: A tiling is put on top of the projection to subdivide space into smaller units a.k.a. tiles. Tilings can be either regular or irregular:
    • irregular: Tiles can have arbitrary shapes and the overall tiling does not need to cover a certain extent. The only restriction is that tiles are not allowed to intersect.
    • regular: Tiles need to have the same shape and the regular tiling needs to fill a certain extent (no holes). The regular tiling follows the OGC standard.
  • tiling_system: Multiple tilings representing a hierarchy and covering the same extent are grouped into a tiling system.
  • grid: Multiple tiling systems with the same tiling scheme but different projections are grouped into a grid. This allows to represent grid systems like the Equi7Grid.

How does geospade fit into the geospatial stack?

pytileproj heavily relies on morecantile and extends its capabilities into a more generic framework for representing geospatial datacubes. As long as compliance is possible, pytileproj follows OGC standards, but it is not limited to web map representations of tiling systems, e.g. a quadtree.

Installation

This package can be installed via pip:

pip install pytileproj

If you want to use pytileproj's visualisation features, then you can install the required optional dependencies with:

pip install pytileproj[vis]

If you want to export tile tables and shapefiles, then you need to install the geo extension:

pip install pytileproj[geo]

Contribute

We are happy if you want to contribute. Please raise an issue explaining what is missing or if you find a bug. We will also gladly accept pull requests against our master branch for new features or bug fixes.

Development setup

For development you can either use a conda/mamba or uv environment. After that you should be able to run uv run pytest to run the test suite.

Here is an example using only uv for creating the environment and managing dependencies.

First, install uv:

wget -qO- https://astral.sh/uv/install.sh | sh

Next, create your virtual environment, e.g.

uv venv --python 3.12

Finally, you can add all required and optional dependencies to it:

uv pip install -r pyproject.toml -e . --all-extras

mamba

Here is an example using mamba together with uv for managing dependencies.

First, install conda and set the path:

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" -O miniforge.sh
bash miniforge.sh -b -p $HOME/miniforge
export PATH="$HOME/miniforge/bin:$PATH"

Next, create a virtual environment:

conda create -n pytileproj python=3.12 mamba
source activate pytileproj
mamba install -c conda-forge uv

Finally, use uv to install all other dependencies and pytileproj itself, e.g.:

uv pip install -r pyproject.toml -e . --all-extras
uv pip install -e . --no-deps

Guidelines

If you want to contribute please follow these steps:

  • fork the pytileproj repository to your account
  • clone the repository
  • make a new feature branch from the pytileproj master branch
  • add your feature
  • please include tests for your contributions in one of the test directories. We use pytest so a simple function called test_my_feature is enough
  • submit a pull request to our master branch

Citation

zenodo

If you use the software in a publication then please cite it using the Zenodo DOI. Be aware that this badge links to the latest package version.

Please select your specific version here to get the DOI of that version. You should normally always use the DOI for the specific version of your record in citations. This is to ensure that other researchers can access the exact research artefact you used for reproducibility.

You can find additional information regarding DOI versioning here.

Metadata

Release files for pytileproj 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytileproj 1.1.1
File Size Uploaded Provenance Actions
pytileproj-1.1.1.tar.gz 31.8 kB Without provenance Details for pytileproj-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pytileproj 1.1.1
File Interpreter ABI Platform Actions
pytileproj-1.1.1-py3-none-any.whl Python 3 none any Details for pytileproj-1.1.1-py3-none-any.whl

Total release size: 68.7 kB

Release files / pytileproj-1.1.1.tar.gz

Download URL pytileproj-1.1.1.tar.gz
Size 31.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bac90e95f6adc55f1b7fcf41af96d3d146aeea5005f607c8132e000f35cb0c40
BLAKE2b-256 checksum
How to use checksums
20a10f067eafe6c4d1e093a5ca001ad1f44d203ea5c21451babe62515943a655
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release files / pytileproj-1.1.1-py3-none-any.whl

Download URL pytileproj-1.1.1-py3-none-any.whl
Size 36.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8f67e931cbf10eb1529b230a6d655911474db0205312be101406d78ae6348ff
BLAKE2b-256 checksum
How to use checksums
bcb1dc99e36e9c1e5ee595db89c1b2b933295e08b734b19004001039a493062d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Security for pytileproj 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page