adilmunawar/zd-claude-plugin/raster-to-polygons

Claude Code and agent skill by adilmunawar/zd-claude-plugin

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

RAM-safe raster to polygon conversion for large rasters: tiling with overlap, components, seam merge, min-area filter, resume.

Install

npx vskill@latest install adilmunawar/zd-claude-plugin/raster-to-polygons

SKILL.md

The same SKILL.md was published earlier as adilmunawar/zd-claude-plugin/raster-to-polygons.

Raster → polygons, tile-safe

Pattern (Python / rasterio / shapely / geopandas):

  1. Open raster; choose tile size 2048–4096 px with 64–128 px overlap. Iterate rasterio.windows.Window.
  2. Per tile: read band → binarise/select class → (optional) scipy.ndimage.label or cv2.connectedComponents → rasterio.features.shapes(mask, transform=window_transform) → shapely polygons with class id.
  3. Write each tile's polygons to a temp GeoPackage/parquet (gpd.to_parquet) — never accumulate in a Python list.
  4. Merge: read all tiles, gdf.dissolve(by='class') is too slow at scale → instead union only polygons touching tile borders: select features whose bounds intersect a seam buffer, unary_union those, replace, keep the rest.
  5. Filter: drop features < min_area_ha (compute area in UTM), drop slivers (area/perimeter² ratio < 0.01).
  6. make_valid, cast to MultiPolygon, write GeoPackage; then topology-repair.

For boundary (edge) masks: invert and flood-fill (cv2.floodFill / ndimage.label on ~boundary) to get parcel interiors, then polygonise interiors — not the boundary lines. Thin boundaries first (skimage.morphology.skeletonize) only if edges are >3 px thick.

Checkpoint: write a progress.json with the last completed tile index so a crashed run resumes.

Reference implementation: scripts/raster_to_polygons.py in this plugin (python "${CLAUDE_PLUGIN_ROOT}/scripts/raster_to_polygons.py" --help).

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
8
7-day trend score
16

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/adilmunawar/zd-claude-plugin/raster-to-polygons/badge)](https://verified-skill.com/skills/adilmunawar/zd-claude-plugin/raster-to-polygons)

Something wrong with this skill or its page? Tell us.