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
Metadata
Release files for rastertoolkit 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rastertoolkit-0.5.1.tar.gz | 20.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rastertoolkit-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.7 kB
Release files / rastertoolkit-0.5.1.tar.gz
| Download URL | rastertoolkit-0.5.1.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f1297fe2babbdd133f3af289fd602d20aef8c2a5be34917457ffd90106f33be
|
|
BLAKE2b-256 checksum How to use checksums |
1ed6a09211ef6f0dc11d1fb6942eb0f770559ad102a6158ce70b08e2c6e51180
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.
Transparency logRelease files / rastertoolkit-0.5.1-py3-none-any.whl
| Download URL | rastertoolkit-0.5.1-py3-none-any.whl |
|---|---|
| Size | 15.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
79a24cb4eca94bccc6e5351f96a9afd798d2bb711e802c6c8146167a04bb1231
|
|
BLAKE2b-256 checksum How to use checksums |
32364f94e7d7f979978ebc027de49a9bc2a4ffe85d4d37ee901bc45fd0d42956
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.
Transparency log