Skip to content
Back to skills

Raster At Scale

ASecurity

Use when processing raster or imagery data that is large — multi-gigabyte GeoTIFFs, mosaics, satellite scenes, DEMs — where loading the whole array into memory would fail or thrash. Makes the agent work in windows/tiles, use overviews and cloud-optimized formats, and avoid out-of-memory full-array reads.

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 7, 2026
ai-agentspythongo

Security analysis

A100/100

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

Scanned September 7, 2026

npx -y skills add buildmoonshot/skillpacks --skill raster-at-scale --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Raster At Scale?

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

Security grade badge for Raster At Scale
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/buildmoonshot-raster-at-scale/badge)](https://www.skillsdirectory.com/skills/buildmoonshot-raster-at-scale)

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: raster-at-scale
description: Use when processing raster or imagery data that is large — multi-gigabyte GeoTIFFs, mosaics, satellite scenes, DEMs — where loading the whole array into memory would fail or thrash. Makes the agent work in windows/tiles, use overviews and cloud-optimized formats, and avoid out-of-memory full-array reads.
---

# Raster at Scale

A large raster will not fit in memory, and the naive `read everything into a NumPy array` is how raster jobs crash. Process big rasters the way they're built to be processed.

## Don't load the whole thing

- Read in **windows/blocks**, not all at once (`rasterio` windowed reads, GDAL block reads). Process tile by tile and write tile by tile.
- Read in the raster's **native block size** where you can — aligned reads are far faster than arbitrary windows.

## Use the right format and pyramids

- Prefer **Cloud-Optimized GeoTIFF (COG)** for efficient partial/range reads.
- Build **overviews** (`gdaladdo`) so display and downsampled analysis don't touch full resolution.
- For chunked array work, reach for `xarray`/`dask` or `rioxarray` rather than a monolithic array.

## Reproject and warp without loading

- Resample/reproject with **`gdalwarp`** (use `-multi -wo NUM_THREADS=ALL_CPUS`), not by reading arrays into Python.
- Pick the resampling method by data type: **nearest** for categorical/classified rasters (preserves class values), **bilinear/cubic** for continuous (elevation, imagery). Using bilinear on a land-cover raster invents classes that don't exist.

## Get the details right

- Honor the **NoData** value so it doesn't poison statistics or show up as real zeros.
- Confirm the CRS before warping or aligning to other layers (see `crs-discipline`).

## Why this matters

The failure modes at scale are distinct: out-of-memory crashes, hour-long full-resolution passes that should have used overviews, and silently wrong resampling that corrupts categorical data. Windowed reads, COGs/overviews, and method-appropriate resampling turn an unworkable raster job into a fast, correct one.

Files in this skill

  • README.md1.5 KB
  • SKILL.md2 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…