Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Lazy raster band processing

Project description

picoraster

Small Python library for processing large raster images.

Currently a work in progress.

Example usage

source = AWSLandsat8Source("LC08_L1TP_139045_20170304_20170316_01_T1", band="8")

# Lazily create a band and build a description of processing steps
band = Band(source) \
    .and_then(Resize(extents)) \
    .and_then(HistogramAdjust()) \
    .and_then(Reproject(crs))

# Forces computation
array = band.render_to_array()

band.render_to_file("output.tif")

Installation

Installing GDAL is the most challenging part. Installing directly from PyPI is historically unlikely to work.

First, install numpy: pip install numpy

Then, choose 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

Running tests

python -m src.tests

Project details


Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
picoraster-0.0.2-py3-none-any.whl (7.7 kB) Copy SHA256 hash SHA256 Wheel py3
picoraster-0.0.2.tar.gz (5.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page