Raster and shape tools
Project description
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f1297fe2babbdd133f3af289fd602d20aef8c2a5be34917457ffd90106f33be
|
|
| MD5 |
67dcfbb887094123d48aabe049f95e75
|
|
| BLAKE2b-256 |
1ed6a09211ef6f0dc11d1fb6942eb0f770559ad102a6158ce70b08e2c6e51180
|
Provenance
The following attestation bundles were made for rastertoolkit-0.5.1.tar.gz:
Publisher:
publish_pypi.yml on InstituteforDiseaseModeling/RasterToolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rastertoolkit-0.5.1.tar.gz -
Subject digest:
7f1297fe2babbdd133f3af289fd602d20aef8c2a5be34917457ffd90106f33be - Sigstore transparency entry: 1970642351
- Sigstore integration time:
-
Permalink:
InstituteforDiseaseModeling/RasterToolkit@9f6ec06e189edc0e7c88fae36e6909061ec3c853 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/InstituteforDiseaseModeling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@9f6ec06e189edc0e7c88fae36e6909061ec3c853 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79a24cb4eca94bccc6e5351f96a9afd798d2bb711e802c6c8146167a04bb1231
|
|
| MD5 |
637234bcb8130d69b47535971f33129e
|
|
| BLAKE2b-256 |
32364f94e7d7f979978ebc027de49a9bc2a4ffe85d4d37ee901bc45fd0d42956
|
Provenance
The following attestation bundles were made for rastertoolkit-0.5.1-py3-none-any.whl:
Publisher:
publish_pypi.yml on InstituteforDiseaseModeling/RasterToolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rastertoolkit-0.5.1-py3-none-any.whl -
Subject digest:
79a24cb4eca94bccc6e5351f96a9afd798d2bb711e802c6c8146167a04bb1231 - Sigstore transparency entry: 1970642434
- Sigstore integration time:
-
Permalink:
InstituteforDiseaseModeling/RasterToolkit@9f6ec06e189edc0e7c88fae36e6909061ec3c853 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/InstituteforDiseaseModeling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@9f6ec06e189edc0e7c88fae36e6909061ec3c853 -
Trigger Event:
workflow_dispatch
-
Statement type: