{"id":13735911,"url":"https://github.com/dymaxionlabs/dask-rasterio","last_synced_at":"2025-04-30T07:48:41.744Z","repository":{"id":50377496,"uuid":"136374210","full_name":"dymaxionlabs/dask-rasterio","owner":"dymaxionlabs","description":"Read and write rasters in parallel using Rasterio and Dask","archived":false,"fork":false,"pushed_at":"2020-11-28T14:35:47.000Z","size":833,"stargazers_count":99,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-21T21:40:15.712Z","etag":null,"topics":["dask","gdal","python","rasterio"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dymaxionlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-06T19:03:20.000Z","updated_at":"2025-03-06T19:38:58.000Z","dependencies_parsed_at":"2022-09-04T23:20:18.880Z","dependency_job_id":null,"html_url":"https://github.com/dymaxionlabs/dask-rasterio","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymaxionlabs%2Fdask-rasterio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymaxionlabs%2Fdask-rasterio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymaxionlabs%2Fdask-rasterio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dymaxionlabs%2Fdask-rasterio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dymaxionlabs","download_url":"https://codeload.github.com/dymaxionlabs/dask-rasterio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666048,"owners_count":21624289,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dask","gdal","python","rasterio"],"created_at":"2024-08-03T03:01:12.892Z","updated_at":"2025-04-30T07:48:41.713Z","avatar_url":"https://github.com/dymaxionlabs.png","language":"Python","funding_links":[],"categories":["`Python` processing of optical imagery (non deep learning)","Packages","Geospatial Library","Python"],"sub_categories":["Python libraries related to EO","Python"],"readme":"# dask-rasterio\n\n[![Build Status](https://travis-ci.org/dymaxionlabs/dask-rasterio.svg?branch=master)](https://travis-ci.org/dymaxionlabs/dask-rasterio)\n[![codecov](https://codecov.io/gh/dymaxionlabs/dask-rasterio/branch/master/graph/badge.svg)](https://codecov.io/gh/dymaxionlabs/dask-rasterio) [![Join the chat at https://gitter.im/dymaxionlabs/dask-rasterio](https://badges.gitter.im/dymaxionlabs/dask-rasterio.svg)](https://gitter.im/dymaxionlabs/dask-rasterio?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n`dask-rasterio` provides some methods for reading and writing rasters in\nparallel using [Rasterio](https://github.com/mapbox/rasterio) and\n[Dask](https://dask.pydata.org) arrays.\n\n\n## Usage\n\n#### Read a multiband raster\n\n```python\n\u003e\u003e\u003e from dask_rasterio import read_raster\n\n\u003e\u003e\u003e array = read_raster('tests/data/RGB.byte.tif')\n\u003e\u003e\u003e array\ndask.array\u003cstack, shape=(3, 718, 791), dtype=uint8, chunksize=(1, 3, 791)\u003e\n\n\u003e\u003e\u003e array.mean()\ndask.array\u003cmean_agg-aggregate, shape=(), dtype=float64, chunksize=()\u003e\n\u003e\u003e\u003e array.mean().compute()\n40.858976977533935\n```\n\n#### Read a single band from a raster\n\n```python\n\u003e\u003e\u003e from dask_rasterio import read_raster\n\n\u003e\u003e\u003e array = read_raster('tests/data/RGB.byte.tif', band=3)\n\u003e\u003e\u003e array\ndask.array\u003craster, shape=(718, 791), dtype=uint8, chunksize=(3, 791)\u003e\n```\n\n#### Write a singleband or multiband raster\n\n```python\n\u003e\u003e\u003e from dask_rasterio import read_raster, write_raster\n\n\u003e\u003e\u003e array = read_raster('tests/data/RGB.byte.tif')\n\n\u003e\u003e\u003e new_array = array \u0026 (array \u003e 100)\n\u003e\u003e\u003e new_array\ndask.array\u003cand_, shape=(3, 718, 791), dtype=uint8, chunksize=(1, 3, 791)\u003e\n\n\u003e\u003e\u003e prof = ... # reuse profile from tests/data/RGB.byte.tif...\n\u003e\u003e\u003e write_raster('processed_image.tif', new_array, **prof)\n```\n\n#### Chunk size\n\nBoth `read_raster` and `write_raster` accept a `block_size` argument that\nacts as a multiplier to the block size of rasters. The default value is 1,\nwhich means the dask array chunk size will be the same as the block size of\nthe raster file. You will have to adjust this value depending on the\nspecification of your machine (how much memory do you have, and the block\nsize of the raster).\n\n\n## Install\n\nInstall with pip:\n\n```\npip install dask-rasterio\n```\n\n## Development\n\nThis project is managed by [Poetry](https://github.com/sdispater/poetry).  If\nyou do not have it installed, please refer to \n[Poetry instructions](https://github.com/sdispater/poetry#installation).\n\nNow, clone the repository and run `poetry install`.  This will create a virtual\nenvironment and install all required packages there.\n\nRun `poetry run pytest` to run all tests.\n\nRun `poetry build` to build package on `dist/`.\n\n\n## Issue tracker\n\nPlease report any bugs and enhancement ideas using the GitHub issue tracker:\n\n  https://github.com/dymaxionlabs/dask-rasterio/issues\n\nFeel free to also ask questions on our\n[Gitter channel](https://gitter.im/dymaxionlabs/dask-rasterio), or by email.\n\n\n## Help wanted\n\nAny help in testing, development, documentation and other tasks is highly\nappreciated and useful to the project.\n\nFor more details, see the file [CONTRIBUTING.md](CONTRIBUTING.md).\n\n\n## License\n\nSource code is released under a BSD-2 license.  Please refer to\n[LICENSE.md](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdymaxionlabs%2Fdask-rasterio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdymaxionlabs%2Fdask-rasterio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdymaxionlabs%2Fdask-rasterio/lists"}