adilmunawar/zd-claude-plugin/raster-to-polygons
Claude Code and agent skill by adilmunawar/zd-claude-plugin
- community
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-polygonsSKILL.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):
- Open raster; choose tile size 2048–4096 px with 64–128 px overlap. Iterate
rasterio.windows.Window. - Per tile: read band → binarise/select class → (optional)
scipy.ndimage.labelorcv2.connectedComponents→rasterio.features.shapes(mask, transform=window_transform)→ shapely polygons with class id. - Write each tile's polygons to a temp GeoPackage/parquet (
gpd.to_parquet) — never accumulate in a Python list. - 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_unionthose, replace, keep the rest. - Filter: drop features
< min_area_ha(compute area in UTM), drop slivers (area/perimeter² ratio < 0.01). make_valid, cast to MultiPolygon, write GeoPackage; thentopology-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
- SKILL.md in the repositoryCheckingplugins/zd-vector/skills/raster-to-polygons/SKILL.md
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
[](https://verified-skill.com/skills/adilmunawar/zd-claude-plugin/raster-to-polygons)