A Cape Town open-space GIS team receives a polygon handover for an inventory update. A self-crossing ring, a missing geometry and a stale repeated revision make a naive buffer repair or simple deduplication unsafe for the accepted layer.
Prepare /data/capetown-parks-geometry-raw.geojson in Python and assign a GeoDataFrame to result.
| Incoming issue | Required result |
|---|---|
Repeated park_id | Keep the first row in file order. |
| Missing geometry | Omit the row. |
| Invalid self-crossing park ring | Use topology-preserving validity repair and retain every polygon part; do not use a zero-width buffer that drops a part. |
| Polygon and multipart results | Deliver all geometry as MultiPolygon in EPSG:4326. |
Return exactly park_id and trimmed name as text with a MultiPolygon geometry. Keep the original park outlines wherever they were already valid.
/data/capetown-parks-geometry-raw.geojson — EPSG:4326; the geometry is in geometry (Polygon / ).
| column | type | meaning |
|---|---|---|
park_id | string | OSM way reference |
name_raw | string | Incoming park name |
source_order | integer | Priority order in incoming file |
These are where the teaching is. Read them twice.
Modelled on a Cape Town GIS data handover using © OpenStreetMap contributors (ODbL 1.0). ISO 19157-1:2023 frames quality as fitness against the stated product specification.
Files: /data/capetown-parks-geometry-raw.geojson · assign result
6 scored, 0 informational
Park identities, names and shapes match the repair contract
50%Every delivered park is topologically valid
10%One multipart polygon type
10%Each park reference appears once
10%Only the inventory fields are delivered
10%The repaired layer retains WGS 84
10%