Rasterio reads and writes gridded geospatial raster datasets in Python. It exposes GDAL-backed I/O through NumPy arrays and includes a rio command-line tool.
Overview
Rasterio is a Python package for working with satellite imagery, terrain models, and other raster data stored in formats such as GeoTIFF. It targets geographic information workflows where analysts and engineers need predictable access to bands, coordinate reference systems, georeferencing transforms, and array-oriented processing.
Opening a dataset yields metadata such as width, height, CRS, transform, band count, and indexes, and supports reading bands into NumPy arrays. Windowed reads map georeferenced bounds to array slices for partial IO. Writers can create new files using profiles derived from existing datasets, including compression and dtype choices.
Higher-level modules help with reprojection, warping, masking, rasterization of vector features, shape extraction, merging, stacking, and plugin-extensible CLI subcommands. The interactive rio insp command loads a file for ad hoc inspection in a Python shell.
Binary wheels on PyPI bundle GDAL with common drivers for Linux, macOS, and Windows. The rio CLI exposes operations for info, clip, calc, merge, warp, and related raster maintenance tasks documented in the project’s user guide.
Key features
- GeoTIFF and GDAL raster formats
- NumPy array read and write
- CRS, transform, and windowed IO
- Reprojection and warping helpers
- Vector-to-raster operations
- rio command-line interface
- CLI plugin extension points
- PyPI binaries with GDAL drivers
Use cases
- Processing satellite or aerial imagery
- Extracting footprints from rasters
- Clipping and mosaicking tiles
- Scripted raster analytics in Python