Skip to content
Back to skills

Rasterio

ASecurity

"Routes Rasterio dataset I/O, windowed processing, in-memory files,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
toolspythonshellbashapi

Works with

  • cli
  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill rasterio --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rasterio?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rasterio
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-rasterio/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-rasterio)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rasterio
description: "Routes Rasterio dataset I/O, windowed processing, in-memory files,
  raster/vector feature workflows, reprojection and mosaicking, and rio CLI
  tasks."
disable-model-invocation: true
metadata:
  disco-role: operating
license: BSD 3-Clause
---

# Rasterio

Rasterio reads and writes geospatial raster data with a NumPy-friendly API and a `rio` command-line interface.

Start here when a user wants to open a raster, inspect metadata, crop or mask by geometry, reproject into a new CRS, merge overlapping scenes, process a raster in windows, or choose the right `rio` command.

## Install and verify

For a local checkout, install from the repository root:

```bash
python -m pip install -e .
```

For a released environment, install the package directly:

```bash
python -m pip install rasterio
```

Rasterio 1.5.x requires Python 3.12+ and a working GDAL/PROJ-backed build or wheel. Optional extras exist for cloud access, plotting, and IPython-based inspection.

Minimal verification:

```bash
python -I -c "import rasterio; print(rasterio.__version__)"
rio --help
```

For a repo-independent smoke check, use [`scripts/check_install.py`](scripts/check_install.py).

Read [`references/repo-provenance.md`](references/repo-provenance.md) when you need to confirm whether this skill still matches the current checkout.

## How to route a user request

- If the user wants basic read/write, band counts, CRS, transform, or profile copying, start with [`sub-skills/dataset-io-profiles/`](sub-skills/dataset-io-profiles/).
- If the user is asking about `Window`, block reads/writes, `MemoryFile`, ZIP/VSI paths, or custom openers, start with [`sub-skills/windows-memory-vsi/`](sub-skills/windows-memory-vsi/).
- If the user is moving between rasters and geometries, masks, rasterization, or nodata cleanup, start with [`sub-skills/features-masks/`](sub-skills/features-masks/).
- If the user needs CRS transforms, reprojection, `WarpedVRT`, merge, or stack, start with [`sub-skills/reprojection-merge-vrt/`](sub-skills/reprojection-merge-vrt/).
- If the user wants `rio` command syntax, safe flags, or Click-style parse troubleshooting, start with [`sub-skills/rio-cli/`](sub-skills/rio-cli/).

If a request spans several topics, pick the most specific sub-skill first and then follow the cross-links inside that sub-skill.

## Runtime map

### `dataset-io-profiles`
Use this for ordinary raster inspection and creation tasks:
- `rasterio.open`
- `DatasetReader` / `DatasetWriter`
- `profile` / `meta`
- dtypes, nodata, compression, band count, dimensions, and simple round trips

### `windows-memory-vsi`
Use this for data that should be processed in chunks, kept in memory, or opened through archive/path abstractions:
- `Window`
- `block_windows`
- `MemoryFile`
- `ZipMemoryFile`
- `zip://` / `file://` / GDAL VSI path handling

### `features-masks`
Use this for geometry-driven raster/vector conversion and mask cleanup:
- `shapes`
- `rasterize`
- `sieve`
- `geometry_window`
- `mask` / `raster_geometry_mask`
- GDAL valid masks vs NumPy masked arrays

### `reprojection-merge-vrt`
Use this for CRS changes and mosaics:
- `transform` / `transform_geom` / `transform_bounds`
- `calculate_default_transform`
- `reproject`
- `WarpedVRT`
- `merge` / `stack`

### `rio-cli`
Use this for shell workflows:
- `rio info`, `bounds`, `transform`, `clip`, `warp`, `mask`, `rasterize`, `shapes`, `merge`, `stack`, `create`, `convert`, `env`, and `insp`

## Shared references and tools

- [`references/troubleshooting.md`](references/troubleshooting.md) — cross-cutting install/import, driver, and optional-extra failures.
- [`scripts/check_install.py`](scripts/check_install.py) — safe install/import/CLI smoke helper that does not depend on the original checkout.

## Common prerequisites

- Python 3.12 or newer.
- GDAL/PROJ available through a wheel, conda environment, or equivalent local installation.
- Optional extras only when needed:
  - `rasterio[s3]` for cloud/object storage access.
  - `rasterio[plot]` for plotting helpers.
  - `rasterio[ipython]` for `rio insp --ipython`.

## What not to do

- Do not tell users to run or read `examples/`, `tests/`, or `docs/` in the original checkout at runtime.
- Do not claim GPU-specific capability for the selected workflows; the package paths here are CPU/GDAL based.
- Do not rely on the current repository path remaining available after this skill is imported.
- Do not duplicate full API tables in this file; use the nearest reference file instead.

## Refresh signal

If the repo commit, public package version, or CLI/API surface changes, refresh this skill before relying on it.

Files in this skill

  • SKILL.md4.6 KB
  • references/repo-provenance.md1.2 KB
  • references/repo-routing-metadata.json318 B
  • references/troubleshooting.md3.3 KB
  • scripts/check_install.py2.9 KB
  • sub-skills/dataset-io-profiles/SKILL.md3.8 KB
  • sub-skills/dataset-io-profiles/references/api-reference.md2 KB
  • sub-skills/dataset-io-profiles/references/troubleshooting.md2 KB
  • sub-skills/dataset-io-profiles/references/workflows.md2 KB
  • sub-skills/dataset-io-profiles/scripts/decimate_copy.py1.9 KB
  • sub-skills/dataset-io-profiles/scripts/make_total_band.py2.1 KB
  • sub-skills/features-masks/SKILL.md4.1 KB
  • sub-skills/features-masks/references/api-reference.md3.8 KB
  • sub-skills/features-masks/references/troubleshooting.md4.4 KB
  • sub-skills/features-masks/references/workflows.md3.3 KB
  • sub-skills/features-masks/scripts/extract_shapes.py2.5 KB
  • sub-skills/features-masks/scripts/rasterize_geometry.py4.2 KB
  • sub-skills/features-masks/scripts/sieve_raster.py1.5 KB
  • sub-skills/reprojection-merge-vrt/SKILL.md4 KB
  • sub-skills/reprojection-merge-vrt/references/api-reference.md4.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.