Skip to main content

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


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

curaster-0.2.0-cp313-cp313-manylinux_2_35_x86_64.whl (58.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.35+ x86-64

curaster-0.2.0-cp312-cp312-manylinux_2_35_x86_64.whl (58.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ x86-64

curaster-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl (58.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.35+ x86-64

curaster-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl (58.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.35+ x86-64

curaster-0.2.0-cp39-cp39-manylinux_2_35_x86_64.whl (58.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.35+ x86-64

File details

Details for the file curaster-0.2.0-cp313-cp313-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for curaster-0.2.0-cp313-cp313-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 0285ddbdf955a8614da8767bdf0a66d0bd418c5f0435319f40ce87ce6bfd093a
MD5 6be30ad7bf160ac15a12fedc0ca705a3
BLAKE2b-256 ec82e7235fff46c35f3acc765e992935430247138d72fe774094f12efce815ec

See more details on using hashes here.

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

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

File details

Details for the file curaster-0.2.0-cp312-cp312-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for curaster-0.2.0-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 96dc3ede2abbe2cc087e5ec2591f1d2c7618eea1d3440fbe3132a4704e35a302
MD5 1e0e6e44fe244a289d947a33e983a690
BLAKE2b-256 b349aee90ccb1aaa3a856860cef271102dea17466d7fc9f0535a1a32370948f8

See more details on using hashes here.

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

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

File details

Details for the file curaster-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for curaster-0.2.0-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 5bca18deb18423b265ba75b7f07bb9dd3f1be17726d7e75a4b831c0c2ba67070
MD5 a79045d9f15281e9e6b96ec3c98333c2
BLAKE2b-256 48c0d766b8921cdb12ad640353ddb6a800711940af42e87a649d8aa8ea6306b6

See more details on using hashes here.

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

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

File details

Details for the file curaster-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for curaster-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 aa3269b45f1d078a83926b25a9aa5e1c3e6d8199e2d2b5f016e06545d5c3bc71
MD5 0119d3da14a4502712b7164c8d1ea7bf
BLAKE2b-256 7023134c8d6c0295dc0d4d5f420a51872b8ae95c93f7b4b2a7843b7aae86e212

See more details on using hashes here.

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

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

File details

Details for the file curaster-0.2.0-cp39-cp39-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for curaster-0.2.0-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 b25561e743dadba52fcf0530884be8f494d573e347d23f0c8c9c6e59a7a57e30
MD5 a8a8be0f93525c165cb3442813c9f9cb
BLAKE2b-256 832562cf74134f44bac0d59b8191c73e4f3f67594f94d3bcf382510100148522

See more details on using hashes here.

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

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

Supported by

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