Skip to main content

Lazy raster band processing

Project description

picoraster

Lazy Python library for raster band manipulation.

Example usage

bands = []

for input in input_list:
    band = Raster(input) \
        .and_then(Resize(extents)) \
        .and_then(HistogramAdjust()) \
        .and_then(Reproject(crs))
    bands.append(end)

multiband = Merge(bands)

# Forces computation
array = multiband.render_to_array()

multiband.render_to_file("output.tif")

Installation

Installing GDAL is the most challenging part. Installing directly from PyPI is unlikely to work. The best choices are one of the following:

  • install with a system package manager
    • Ubuntu: sudo apt install libgdal-dev
    • MacOS: brew install gdal
  • install from conda-forge: conda install -c conda-forge gdal
  • compile manually

Afterwards, the correct Python bindings can be installed with

pip install GDAL==$(gdal-config --version) --global-option=build_ext --global-option="-I/usr/include/gdal" 

Finally, pip install picoraster

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

picoraster-0.0.1.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

picoraster-0.0.1-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

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