All Projects → dymaxionlabs → dask-rasterio

dymaxionlabs / dask-rasterio

Licence: BSD-3-Clause License
Read and write rasters in parallel using Rasterio and Dask

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to dask-rasterio

gaia
Gaia is a geospatial analysis library jointly developed by Kitware and Epidemico.
Stars: ✭ 29 (-64.63%)
Mutual labels:  gdal, dask
interpies
A collection of functions for reading, displaying, transforming and analyzing geophysical data.
Stars: ✭ 26 (-68.29%)
Mutual labels:  gdal, rasterio
rio-rgbify
Encoded arbitrary bit depth rasters in psuedo base-256
Stars: ✭ 62 (-24.39%)
Mutual labels:  rasterio
rio-toa
Top Of Atmosphere (TOA) calculations for Landsat 8
Stars: ✭ 38 (-53.66%)
Mutual labels:  rasterio
node-gdal-async
Node.js bindings for GDAL (Geospatial Data Abstraction Library) with full async support
Stars: ✭ 52 (-36.59%)
Mutual labels:  gdal
satproc
🛰️ Python library and CLI tools for processing geospatial imagery for ML
Stars: ✭ 27 (-67.07%)
Mutual labels:  rasterio
dvc dask use case
A use case of a reproducible machine learning pipeline using Dask, DVC, and MLflow.
Stars: ✭ 22 (-73.17%)
Mutual labels:  dask
bumblebee
🚕 A spreadsheet-like data preparation web app that works over Optimus (Pandas, Dask, cuDF, Dask-cuDF, Spark and Vaex)
Stars: ✭ 120 (+46.34%)
Mutual labels:  dask
php-uavt-adreskodu-botu
Php ile uavt adres kodu botu
Stars: ✭ 2 (-97.56%)
Mutual labels:  dask
esmlab
Earth System Model Lab (esmlab). ⚠️⚠️ ESMLab functionality has been moved into <https://github.com/NCAR/geocat-comp>. ⚠️⚠️
Stars: ✭ 23 (-71.95%)
Mutual labels:  dask
madpy-dask
MadPy Dask talk materials
Stars: ✭ 33 (-59.76%)
Mutual labels:  dask
mloperator
Machine Learning Operator & Controller for Kubernetes
Stars: ✭ 85 (+3.66%)
Mutual labels:  dask
lazycluster
🎛 Distributed machine learning made simple.
Stars: ✭ 43 (-47.56%)
Mutual labels:  dask
datatile
A library for managing, validating, summarizing, and visualizing data.
Stars: ✭ 419 (+410.98%)
Mutual labels:  dask
osm-export-tool-python
command line tool + Python library for exporting OSM in various file formats.
Stars: ✭ 32 (-60.98%)
Mutual labels:  gdal
rio-hist
Histogram matching plugin for rasterio
Stars: ✭ 71 (-13.41%)
Mutual labels:  rasterio
dask-pytorch-ddp
dask-pytorch-ddp is a Python package that makes it easy to train PyTorch models on dask clusters using distributed data parallel.
Stars: ✭ 50 (-39.02%)
Mutual labels:  dask
gismanager
Publish Your GIS Data(Vector Data) to PostGIS and Geoserver
Stars: ✭ 45 (-45.12%)
Mutual labels:  gdal
rio-glui
Explore CloudOptimized geotiff on your browser using Mapbox GL JS
Stars: ✭ 47 (-42.68%)
Mutual labels:  rasterio
gdal2tiles
A python library for generating map tiles based on gdal2tiles.py from GDAL project
Stars: ✭ 53 (-35.37%)
Mutual labels:  gdal

dask-rasterio

Build Status codecov Join the chat at https://gitter.im/dymaxionlabs/dask-rasterio

dask-rasterio provides some methods for reading and writing rasters in parallel using Rasterio and Dask arrays.

Usage

Read a multiband raster

>>> from dask_rasterio import read_raster

>>> array = read_raster('tests/data/RGB.byte.tif')
>>> array
dask.array<stack, shape=(3, 718, 791), dtype=uint8, chunksize=(1, 3, 791)>

>>> array.mean()
dask.array<mean_agg-aggregate, shape=(), dtype=float64, chunksize=()>
>>> array.mean().compute()
40.858976977533935

Read a single band from a raster

>>> from dask_rasterio import read_raster

>>> array = read_raster('tests/data/RGB.byte.tif', band=3)
>>> array
dask.array<raster, shape=(718, 791), dtype=uint8, chunksize=(3, 791)>

Write a singleband or multiband raster

>>> from dask_rasterio import read_raster, write_raster

>>> array = read_raster('tests/data/RGB.byte.tif')

>>> new_array = array & (array > 100)
>>> new_array
dask.array<and_, shape=(3, 718, 791), dtype=uint8, chunksize=(1, 3, 791)>

>>> prof = ... # reuse profile from tests/data/RGB.byte.tif...
>>> write_raster('processed_image.tif', new_array, **prof)

Chunk size

Both read_raster and write_raster accept a block_size argument that acts as a multiplier to the block size of rasters. The default value is 1, which means the dask array chunk size will be the same as the block size of the raster file. You will have to adjust this value depending on the specification of your machine (how much memory do you have, and the block size of the raster).

Install

Install with pip:

pip install dask-rasterio

Development

This project is managed by Poetry. If you do not have it installed, please refer to Poetry instructions.

Now, clone the repository and run poetry install. This will create a virtual environment and install all required packages there.

Run poetry run pytest to run all tests.

Run poetry build to build package on dist/.

Issue tracker

Please report any bugs and enhancement ideas using the GitHub issue tracker:

https://github.com/dymaxionlabs/dask-rasterio/issues

Feel free to also ask questions on our Gitter channel, or by email.

Help wanted

Any help in testing, development, documentation and other tasks is highly appreciated and useful to the project.

For more details, see the file CONTRIBUTING.md.

License

Source code is released under a BSD-2 license. Please refer to LICENSE.md for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].