/zd-vector:straighten-edgesfrom Zaraat Dost · Vector
Removes staircase artifacts from raster-derived parcel boundaries using a junction graph and deviation test, preserving shared edges between polygons.
Ships in Zaraat Dost · Vector. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Simplifying polygons one at a time breaks shared edges. Work on the edge graph instead.
edges = unary_union(gdf.boundary); shapely.get_parts(edges) yields each shared segment once. Load into a NetworkX undirected graph: nodes = segment endpoints (rounded to grid, e.g. 0.01 m in UTM), edge attribute = the LineString.max_deviation <= DEVIATION_THRESHOLD (2.5 m works at 0.3 m imagery; use 1–2 px at Sentinel scale) replace the path with the chord; otherwise keep it, or apply simplify(tol, preserve_topology=True) only to that path.polygonize the straightened edges; reassign attributes from the original parcels by largest intersection area.Optional orthogonalisation for field layers: snap path headings within ±10° of the local dominant orientation (from a histogram of edge azimuths in UTM) to that orientation before rebuilding.
Raster-first alternative when the mask still exists: cv2.findContours + approxPolyDP(epsilon≈1.5 px) per component label, then steps 1–5.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub adilmunawar/zd-claude-plugin --plugin zd-vector5 skills in this plugin
/gap-analysisCompare a mapped parcel layer with an AOI or previous version: missing layer, coverage summary, added/removed/changed parcels./raster-to-polygonsRAM-safe raster to polygon conversion for large rasters: tiling with overlap, components, seam merge, min-area filter, resume./road-subtractSubtract OSM/Overture road, canal and rail buffers from parcels; fix gap-fill edge bleeding./topology-repairFix invalid geometries, overlaps, gaps, slivers and mixed types in parcel layers while keeping shared edges. Apply after polygonisation, simplification or merge.Other plugins' skills for the same job