---
name: "rasterio-geotiff-satellite-raster"
description: "Read, inspect, and transform multi-spectral satellite imagery and elevation rasters with Rasterio."
metadata:
  author: "Rasterio"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "read geotiff rasterio"
  - "calculate ndvi rasterio"
  - "windowed reading rasterio"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Rasterio Satellite GeoTIFF Processing & Windowing

Processes raster data using Rasterio (GDAL): reading multi-band GeoTIFFs, extracting metadata and affine transforms, windowed reads for large rasters, calculating NDVI band indices, and rasterizing vectors.

## When to Invoke
Invoke this skill whenever you need to:
- read geotiff rasterio
- calculate ndvi rasterio
- windowed reading rasterio

## Execution SOP & Rules
1. Open dataset: with rasterio.open('satellite.tif') as src: red = src.read(4); nir = src.read(8).
2. Compute band math: ndvi = (nir.astype(float) - red.astype(float)) / (nir + red).
3. Perform windowed read: src.read(1, window=rasterio.windows.Window(col_off=100, row_off=100, width=500, height=500)).
4. Write output raster updating profile with driver='GTiff', dtype='float32', and compress='deflate'.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
