Review checklist¶
Work through this before opening a PR. Reviewers use the same list.
Items marked CI are checked automatically on every pull request that
touches data/, schemas/ or pipeline/ — by wgj validate --checksums,
wgj finalize --check and wgj index --check, plus a wgj manifest
regeneration that must leave no diff. Run them locally first:
wgj validate --checksums data/earth/XXX
wgj finalize --check data/earth/XXX
wgj index --check
wgj manifest data/earth/XXX && git diff --quiet -- data/earth/XXX/manifest.json
just check-data runs the same four over the whole tree. Everything else
needs a human.
Licensing¶
- CI —
source.name,source.url,source.licenseandsource.retrievedare all filled in - CI —
source.licenseand everydatasets[].licenseare on the permissive allow-list — thelicenseenum ofschemas/manifest.schema.json:CC0-1.0,CC-BY-2.5,CC-BY-3.0,CC-BY-3.0-IGO,CC-BY-4.0,DL-DE-BY-2.0,Etalab-2.0,ODC-By-1.0,OGL-Canada-2.0,OGL-UK-3.0,SG-ODL-1.0,public-domain. Anything else — every ODbL and CC-BY-SA variant included — is rejected - CI — if
source.licenseismixed,source.licenseslists the actual licences - Source appears on the green list, or its terms have been checked and explicitly cleared
- Attribution requirements, if any, are satisfiable by the catalog page
- Data is not from GADM, a proprietary provider, or an unlicensed source
Naming and layout¶
- Path is
data/{body}/{CODE}/{CODE}_{LEVEL}.geojson -
CODEis the correct uppercase ISO 3166-1 alpha-3 - Extension is
.geojson, and there is no duplicate.json - Split parts, if any, are in
{LEVEL}/{code}.geojson - Previews are in
preview/named{stem}.preview.geojson - No spaces, accents or non-ASCII characters in any path
- The country has an entry in
pipeline/src/wgj/tables/countries.json
File contents¶
- CI — valid JSON, and a
FeatureCollection - CI — top-level
bboxpresent - CI — no
crsmember — forbidden by RFC 7946 - CI — at least one feature, and no
nullgeometries - CI — under 50 MB
- CI — canonical layout: one feature per line, compact, coordinates
at most 6 decimals —
wgj finalize --checkpasses - CI —
bboxequals the extent of the coordinates - Coordinates are longitude-first, EPSG:4326 / CRS84
- Right-hand-rule winding
- Antimeridian crossings cut at 180°, if applicable
-
npx @mapbox/geojsonhint file.geojsonis clean
Properties¶
- CI — every feature validates against
schemas/feature-properties.schema.json:shapeName,shapeISO,shapeGroup,shapeTypepresent, only the known optional keys,src_*for everything else - CI —
shapeISOis a string on every feature;""where the upstream has no code, never an opaque id; unique within the level where non-empty - CI — every feature has an
idof the form{ISO3}:{LEVEL}:{key}, unique within the file -
shapeISOis zero-padded where the official code requires -
shapeTypematches the file's level - Source attributes preserved under
src_ - Esri artifacts removed (
objectid,st_area_sh,st_length_,shape_leng) - Names carry correct diacritics and show no mojibake (
Ã,Â,â€) - Names are not abbreviated
Nesting, where multiple levels are present¶
- Every ADMn feature nests inside exactly one ADMn-1 feature
- CI — every
parentIDresolves to a feature that exists in the country - Every feature below ADM1 carries
adm1ISO(or"unassigned"), and every feature with a published parent level carriesparentISOandparentID—wgj finalizewrites them; anunassignedcount is explained innotes - All levels come from the same vintage
Manifest¶
- CI —
manifest.jsonexists in the country directory and validates againstschemas/manifest.schema.json - CI —
body,name,crs,sourceandstatusare present - CI — every dataset entry has a feature count and a
license - CI — feature counts match the files, and for split levels
parts[].featuressum to the level'sfeatures - CI —
bytesandsha256of every file match (--checksums) - CI —
data/index.jsonwas regenerated (wgj index --check) - CI —
notes, if present, is a single line -
iso_a3,iso_a2andm49_regionmatch the registry -
datasetsregenerated withwgj manifest, not hand-edited - Feature count matches the official number of units, or
notesexplains the discrepancy - Bounding box is in the correct hemisphere
Previews¶
- CI — every preview recorded in the manifest exists and is under 2 MB. A dataset with no preview recorded is a warning, not an error — but the catalog map will be empty, so fix it
- Previews were generated before
wgj manifest, so the manifest records their path and size - Preview feature count equals the source feature count
(
wgj previewsrefuses to write one that does not) - Rendered preview looks like the country — no missing islands, no slivers
Size¶
- CI — every
.geojsonis under 50 MB - No Git LFS
Registries¶
- A new entry in
pipeline/src/wgj/tables/shapeiso_fixes.jsoncorrects a documented upstream error to the unit's real ISO 3166-2 code, and the PR says where the error is documented — the file is not for inventing codes - A new entry in
pipeline/src/wgj/tables/id_overrides.jsonis explained in the PR - If an ADM1 code was corrected, the municipal parts were re-derived
(
wgj build --resplit XXX, thenwgj finalize) and the part under the old code is gone
Documentation¶
- If the country has quirks — missing levels, disputed areas, unusual
codes — they are in
notes - If a new convention was needed, Reference is updated in the same PR
Build¶
-
mkdocs build --strictpasses - The new pages render correctly under
mkdocs serve