dc-l2-lagos-snap-normalize

Analyst notes

Description

Multi-step data-cleaning chain on a hand-crafted Lagos zoning fixture. The task tests whether the agent can read the data carefully enough to infer the four canonical zoning families from the variant spellings, order the cleanup steps so the dissolve actually unifies adjacent parcels, and resist the temptation to reproject to Web Mercator for a portal export. The deliberate hidden gotcha is the sub-millimetre vertex offset between adjacent parcels: a dissolve without a snap looks like it works but leaves thousands of tiny interior rings.

Approach

  1. Read the GPKG and look at the zoning_class values to figure out the four canonical families behind the variant spellings.
  2. Snap every coordinate to a 1 mm grid so adjacent parcels' shared corners coincide exactly.
  3. Drop the zero-area ghost polygons left over from collinear-vertex parcels.
  4. Normalise each non-blank class label to its canonical TitleCase value and drop the blank or whitespace-only rows.
  5. Dissolve per canonical class and recompute area_m2 from the resulting geometry in metres.
  6. Write the four-row result as GPKG, keeping the input CRS intact.

Pitfalls

Inputs

nameformatcrsgeometryfeatures
lagos_zoning_legacy gpkg EPSG:26331 Polygon 10,080

Expected outputs

nameformatcrsgeometryfeatures
zoning_aggregated.gpkg gpkg EPSG:26331 Polygon 4

Map

Recent runs task v3

adapterstartedscorestepsdurationcoststatus
openrouter-gemma4-26b-basic 2026-06-18T07:32:32Z pending pending
openrouter-deepseek-v4-flash-basic 2026-06-18T03:08:04Z 0.00 14 2:25 0.60¢ done
openrouter-deepseek-v4-flash-detailed 2026-06-17T22:01:33Z 0.00 23 3:47 1.37¢ done
openrouter-gemma4-26b-detailed 2026-06-17T19:47:47Z 0.00 8 0:46 0.41¢ done
openrouter-deepseek-v4-flash-basic 2026-06-16T21:43:55Z 1.00 16 2:21 0.55¢ done