Skip to content
Back to skills

Rasterio Windowed Raster Preprocessing Starter

ASecurity

Use this skill to generate a tiny toy raster with Rasterio, extract a window, downsample it, and summarize the preprocessing result in compact JSON.

  • 38 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
ai-agentspythonbash

Works with

  • cli

Security analysis

A100/100

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

Scanned September 8, 2026

npx -y skills add ma-compbio-lab/SkillFoundry --skill rasterio-windowed-raster-preprocessing-starter --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rasterio Windowed Raster Preprocessing Starter?

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

Security grade badge for Rasterio Windowed Raster Preprocessing Starter
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ma-compbio-lab-rasterio-windowed-raster-preprocessing-starter/badge)](https://www.skillsdirectory.com/skills/ma-compbio-lab-rasterio-windowed-raster-preprocessing-starter)

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
# Rasterio Windowed Raster Preprocessing Starter

Use this skill to generate a tiny toy raster with Rasterio, extract a window, downsample it, and summarize the preprocessing result in compact JSON.

## What it does

- Creates a deterministic single-band GeoTIFF with a simple `EPSG:4326` transform.
- Reads a 2x2 window from the raster.
- Produces a 2x2 average-resampled version of the whole raster.
- Emits a compact JSON summary with bounds, means, and extracted values.

## When to use it

- You need a local starter for raster preprocessing or remote-sensing data handling.
- You want a minimal example of `rasterio.open`, `Window`, and average resampling.
- You want a deterministic JSON artifact before moving on to larger raster pipelines.

## Example

```bash
slurm/envs/geospatial/bin/python skills/earth-climate-and-geospatial-science/rasterio-windowed-raster-preprocessing-starter/scripts/run_rasterio_windowed_preprocessing.py \
  --out scratch/geospatial/rasterio_preprocessing_summary.json
```

## Verification

- Skill-local tests: `python3 -m unittest discover -s skills/earth-climate-and-geospatial-science/rasterio-windowed-raster-preprocessing-starter/tests -p 'test_*.py'`
- Expected summary: `window_values == [[6.0, 7.0], [10.0, 11.0]]`

Files in this skill

  • SKILL.md1.2 KB
  • assets/README.md96 B
  • assets/toy_rasterio_preprocessing_summary.json518 B
  • examples/README.md130 B
  • metadata.yaml1.2 KB
  • refs.md83 B
  • scripts/run_rasterio_windowed_preprocessing.py3.3 KB
  • tests/test_run_rasterio_windowed_preprocessing.py1.3 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…