--- id: rasterio version: "1.5.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # rasterio — Fast and direct raster I/O for use with NumPy License: permissive · Maintenance: active · Downloads: 9.7M/mo ## What it is and what it does Rasterio is a Python library for reading and writing geospatial raster data—gridded datasets stored in formats like GeoTIFF that are common in geographic information systems. It wraps GDAL and exposes raster I/O through a NumPy-based API, letting you read bands directly into arrays, inspect metadata like coordinate reference systems and transforms, and write processed data back to disk. The library is designed for developers working with satellite imagery, digital elevation models, and other gridded geospatial data. It includes a command-line tool (rio) for interactive inspection and format conversion, plus support for plugins to extend functionality. Rasterio 1.5+ requires Python >= 3.12, NumPy >= 2, and GDAL >= 3.8, with official binary packages available for major platforms. Use it for: - Read satellite or aerial imagery bands and perform band math (e.g., averaging RGB to create panchromatic data). - Extract raster data within a georeferenced bounding box or window for regional analysis. - Convert between raster formats (e.g., GeoTIFF to netCDF) with coordinate system and compression control. - Inspect and validate raster metadata (CRS, transform, band count) before processing. - Write processed NumPy arrays back to georeferenced raster files with custom compression and data types. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Rasterio reads and writes geospatial raster data in formats like GeoTIFF, providing a Python API based on N-D arrays for working with gridded datasets. Yes. Rasterio is actively maintained, production-stable, has no known vulnerabilities, and is the standard Python interface for raster I/O in geospatial workflows. Medium install friction is manageable given the availability of official binary wheels. Install if you work with gridded geospatial data. ## Install pip install rasterio uv add rasterio poetry add rasterio ## Installing rasterio Before you install: Medium install friction due to compiled C/Cython dependencies and GDAL requirements, but official binary wheels are available for Linux, macOS, and Windows. Active maintenance with a recent release (6 days old) and 2560 repository stars indicate solid ongoing support. License in practice: BSD-3-Clause is permissive; you can use, modify, and distribute rasterio freely in commercial and open-source projects with minimal restrictions. Quickstart: import rasterio import numpy as np with rasterio.open('input.tif') as src: data = src.read() profile = src.profile with rasterio.open('output.tif', 'w', **profile) as dst: dst.write(data) Requires Python >= 3.12, NumPy >= 2, and GDAL >= 3.8; GDAL system library must be installed or available via binary wheels. Verify before relying: - Whether the HDF5, netCDF, and OpenJPEG2000 drivers mentioned are included in all PyPI binary wheels or only some platforms. - Performance characteristics for very large raster files or streaming workflows. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 9.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags geospatial raster I/O, GeoTIFF read write, raster data processing, geographic grid data, GDAL Python wrapper, raster file access, geospatial numpy arrays, geospatial, raster-data, gdal [View on SkillFed](https://skillfed.io/packages/rasterio) · [View on PyPI](https://pypi.org/project/rasterio/)