Skip to main content

RasterToolkit

RasterToolkit is a Python package for processing rasters with minimal dependencies. For example, with rastertoolkit you can extract populations corresponding to an administrative shapefile from a raster file.

Setup

Install from github:

python -m pip install .

Getting Started

A typical raster_clip API usage scenario:

    from rastertoolkit import raster_clip

    # Clipping raster with shapes  
    pop_dict = raster_clip(raster_file, shape_file)  

See the complete code in the WorldPop example (examples/worldpop)

A typical shape_subdivide API usage scenario:

    from rastertoolkit import shape_subdivide

    # Create shape subdivision layer
    subdiv_stem = shape_subdivide(shape_stem=shape_file)

See the complete code in the Shape Subdivision example (examples/shape_subdivide)

Running Tests

Install additional packages (like pytest)::

    python -m pip install .[test]

Run pytest command::

    # Run test for a specific module
    python -m pytest -v tests/test_shape.py

    # All tests (before a commit or merging a PR)
    python -m pytest -v

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rastertoolkit-0.5.1.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

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

rastertoolkit-0.5.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file rastertoolkit-0.5.1.tar.gz.

File metadata

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

File hashes

Hashes for rastertoolkit-0.5.1.tar.gz
Algorithm Hash digest
SHA256 7f1297fe2babbdd133f3af289fd602d20aef8c2a5be34917457ffd90106f33be
MD5 67dcfbb887094123d48aabe049f95e75
BLAKE2b-256 1ed6a09211ef6f0dc11d1fb6942eb0f770559ad102a6158ce70b08e2c6e51180

See more details on using hashes here.

Provenance

The following attestation bundles were made for rastertoolkit-0.5.1.tar.gz:

Publisher: publish_pypi.yml on InstituteforDiseaseModeling/RasterToolkit

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

File details

Details for the file rastertoolkit-0.5.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for rastertoolkit-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79a24cb4eca94bccc6e5351f96a9afd798d2bb711e802c6c8146167a04bb1231
MD5 637234bcb8130d69b47535971f33129e
BLAKE2b-256 32364f94e7d7f979978ebc027de49a9bc2a4ffe85d4d37ee901bc45fd0d42956

See more details on using hashes here.

Provenance

The following attestation bundles were made for rastertoolkit-0.5.1-py3-none-any.whl:

Publisher: publish_pypi.yml on InstituteforDiseaseModeling/RasterToolkit

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

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 files

0.4.9

2 files

0.4.6

2 files

0.4.5

2 files

0.4.1

2 files

0.3.12

2 files

0.3.11

2 files

0.0.1

2 files

Supported by

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