CUDA-accelerated Raster Algebra Calculator
Project description
cuRaster
Curaster is a high-performance Python module written in C++ and CUDA. It is designed to compute the Normalized Difference Vegetation Index (NDVI) on massive raster datasets using GPU.
Installation
Install the precompiled wheel via pip:
pip install curaster
Requirements (for building from source)
To build and run this module from source, your system needs:
- NVIDIA GPU with CUDA Toolkit installed (
nvcc) - GDAL C++ library (
libgdal-dev) - CMake 3.18+
- pybind11 (
pip install pybind11) - A C++17-compatible compiler
Usage
Once installed, simply import it into Python:
import curaster
curaster.ndvi(
input_file="data/massive_satellite_image.tif",
output_file="data/output_ndvi.tif",
red_band_index=3,
nir_band_index=4,
chunk_size=256, # Align this with your TIFF's BLOCKYSIZE for max speed
verbose=True
)
API Reference
curaster.ndvi(...)
Calculates (NIR - Red) / (NIR + Red) and saves the result to a new single-band Float32 GeoTIFF.
| Argument | Type | Default | Description |
|---|---|---|---|
input_file |
str |
Required | Path to the input multispectral raster. |
output_file |
str |
Required | Path where the output NDVI raster will be saved. |
red_band_index |
int |
Required | The GDAL band number (1-indexed) containing Red data. |
nir_band_index |
int |
Required | The GDAL band number (1-indexed) containing NIR data. |
chunk_size |
int |
256 |
The number of horizontal rows to process at a time. |
verbose |
bool |
True |
If true, prints a progress bar to the terminal. |
Building from Source
To build from source using CMake:
mkdir build
cd build
cmake .. -Dpybind11_DIR=$(python -c "import pybind11; print(pybind11.get_cmake_dir())")
make
Alternatively, you can compile directly with nvcc:
nvcc -O3 -shared -std=c++17 -Xcompiler -fPIC \
-o curaster$(python3-config --extension-suffix) src/raster.cu \
$(python3 -m pybind11 --includes) \
$(gdal-config --cflags) $(gdal-config --libs)
License
See LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 curaster-0.2.0-cp313-cp313-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: curaster-0.2.0-cp313-cp313-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 58.1 MB
- Tags: CPython 3.13, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0285ddbdf955a8614da8767bdf0a66d0bd418c5f0435319f40ce87ce6bfd093a
|
|
| MD5 |
6be30ad7bf160ac15a12fedc0ca705a3
|
|
| BLAKE2b-256 |
ec82e7235fff46c35f3acc765e992935430247138d72fe774094f12efce815ec
|
Provenance
The following attestation bundles were made for curaster-0.2.0-cp313-cp313-manylinux_2_35_x86_64.whl:
Publisher:
release.yml on purijs/curaster
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curaster-0.2.0-cp313-cp313-manylinux_2_35_x86_64.whl -
Subject digest:
0285ddbdf955a8614da8767bdf0a66d0bd418c5f0435319f40ce87ce6bfd093a - Sigstore transparency entry: 1203674051
- Sigstore integration time:
-
Permalink:
purijs/curaster@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/purijs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Trigger Event:
release
-
Statement type:
File details
Details for the file curaster-0.2.0-cp312-cp312-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: curaster-0.2.0-cp312-cp312-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 58.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96dc3ede2abbe2cc087e5ec2591f1d2c7618eea1d3440fbe3132a4704e35a302
|
|
| MD5 |
1e0e6e44fe244a289d947a33e983a690
|
|
| BLAKE2b-256 |
b349aee90ccb1aaa3a856860cef271102dea17466d7fc9f0535a1a32370948f8
|
Provenance
The following attestation bundles were made for curaster-0.2.0-cp312-cp312-manylinux_2_35_x86_64.whl:
Publisher:
release.yml on purijs/curaster
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curaster-0.2.0-cp312-cp312-manylinux_2_35_x86_64.whl -
Subject digest:
96dc3ede2abbe2cc087e5ec2591f1d2c7618eea1d3440fbe3132a4704e35a302 - Sigstore transparency entry: 1203674062
- Sigstore integration time:
-
Permalink:
purijs/curaster@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/purijs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Trigger Event:
release
-
Statement type:
File details
Details for the file curaster-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: curaster-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 58.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bca18deb18423b265ba75b7f07bb9dd3f1be17726d7e75a4b831c0c2ba67070
|
|
| MD5 |
a79045d9f15281e9e6b96ec3c98333c2
|
|
| BLAKE2b-256 |
48c0d766b8921cdb12ad640353ddb6a800711940af42e87a649d8aa8ea6306b6
|
Provenance
The following attestation bundles were made for curaster-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl:
Publisher:
release.yml on purijs/curaster
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curaster-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl -
Subject digest:
5bca18deb18423b265ba75b7f07bb9dd3f1be17726d7e75a4b831c0c2ba67070 - Sigstore transparency entry: 1203674048
- Sigstore integration time:
-
Permalink:
purijs/curaster@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/purijs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Trigger Event:
release
-
Statement type:
File details
Details for the file curaster-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: curaster-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 58.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa3269b45f1d078a83926b25a9aa5e1c3e6d8199e2d2b5f016e06545d5c3bc71
|
|
| MD5 |
0119d3da14a4502712b7164c8d1ea7bf
|
|
| BLAKE2b-256 |
7023134c8d6c0295dc0d4d5f420a51872b8ae95c93f7b4b2a7843b7aae86e212
|
Provenance
The following attestation bundles were made for curaster-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl:
Publisher:
release.yml on purijs/curaster
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curaster-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl -
Subject digest:
aa3269b45f1d078a83926b25a9aa5e1c3e6d8199e2d2b5f016e06545d5c3bc71 - Sigstore transparency entry: 1203674056
- Sigstore integration time:
-
Permalink:
purijs/curaster@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/purijs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Trigger Event:
release
-
Statement type:
File details
Details for the file curaster-0.2.0-cp39-cp39-manylinux_2_35_x86_64.whl.
File metadata
- Download URL: curaster-0.2.0-cp39-cp39-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 58.1 MB
- Tags: CPython 3.9, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b25561e743dadba52fcf0530884be8f494d573e347d23f0c8c9c6e59a7a57e30
|
|
| MD5 |
a8a8be0f93525c165cb3442813c9f9cb
|
|
| BLAKE2b-256 |
832562cf74134f44bac0d59b8191c73e4f3f67594f94d3bcf382510100148522
|
Provenance
The following attestation bundles were made for curaster-0.2.0-cp39-cp39-manylinux_2_35_x86_64.whl:
Publisher:
release.yml on purijs/curaster
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curaster-0.2.0-cp39-cp39-manylinux_2_35_x86_64.whl -
Subject digest:
b25561e743dadba52fcf0530884be8f494d573e347d23f0c8c9c6e59a7a57e30 - Sigstore transparency entry: 1203674044
- Sigstore integration time:
-
Permalink:
purijs/curaster@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/purijs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8b6ebdbef8ff352e85e159496e51a4435dac7321 -
Trigger Event:
release
-
Statement type: