spatial-data-qalisted
Install: claude install-skill wiatrek-kevin-s/columbus
# Spatial data QA
QA is finding what is wrong, saying so with numbers, and deciding for each finding
whether to fix it, flag it or ask the data owner. It is never quietly deleting the rows that
look bad.
## General practice (with or without Columbus)
### The rule: never silently drop rows
Every row that goes in is accounted for in what comes out: kept, fixed (with a record of
what changed), flagged, or excluded with a count and a reason the person agreed to. If you
filtered anything, say how many rows and why.
### What to check, in order
1. **CRS sanity.** A CRS is recorded; the coordinates fall inside its area of use; the
units are what you expect; X and Y are not swapped. (See the crs-and-datums skill.)
Everything below is meaningless if the layer is in the wrong place.
2. **Null and empty geometry.** Null (no geometry at all) and empty (a geometry with no
coordinates) are different. Count both. They usually mean a failed geocode, a record
with no location yet, or a broken export.
3. **Validity.** Count invalid geometries and the reasons:
- self-intersection (a "bowtie" polygon, a ring that crosses itself);
- ring self-intersection or a hole that touches the shell along a line;
- hole outside its shell, or nested shells in a MultiPolygon;
- unclosed rings or too few points (from bad exports);
- duplicate consecutive vertices and spikes (often valid, but noisy).
4. **Ring orientation.** OGC/GEOS validity ignores it, but consumers do not agree