Skip to content

World GeoJSON v1.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Sep 18:48
· 22 commits to main since this release
7b54861

Data release v1.0.0. Pin it with
https://raw.githubusercontent.com/andresgmg/World-GeoJSON/v1.0.0/data/<path>
or download the assets below (SHA256SUMS covers every file).

The first tagged release, cut from main once the data contract merges.
Everything in this section ships in it: the contract, the engineering hygiene,
the Americas, the pipeline and the documentation site.

Added — data contract v1

  • A stable Feature id on every one of the 16,195 features,
    {ISO3}:{LEVEL}:{key}, unique across the repository: the real shapeISO
    when there is one (CHL:ADM3:01402, USA:ADM1:US-SD), otherwise a
    name-based key (USA:ADM2:US-SD.davison, COL:ADM2:san-rafael), with a
    deterministic numeric suffix on name collisions. Manual keys can be pinned
    in scripts/id_overrides.json (empty today).
  • Hierarchy fields everywhere they apply: adm1ISO on every feature
    below ADM1 when the country has one, combined files included (13,181
    features); parentISO and parentID — the parent's id — on every
    feature with a published parent level (16,063 features), in every country
    rather than only Chile.
  • data/index.json, the global index: every territory and dataset in one
    340 KB file (39 KB gzipped), manifests embedded verbatim, no timestamp, so
    it is byte-deterministic. Generated by scripts/build_index.py.
  • JSON Schemas in schemas/ (draft 2020-12) for the manifest, the index,
    a feature, its properties and the country registry, published at
    https://andresgmg.github.io/World-GeoJSON/schemas/. The licence allow-list
    is now the manifest schema's license enum, and fetch_sources.py maps
    upstream licence text onto the same ids.
  • scripts/finalize_geojson.py, the pipeline step that writes the ids,
    the hierarchy, the shapeISO corrections, the bbox and the canonical file
    layout (one feature per line, compact, 6 decimals; a no-op when re-run).
    build_data.py runs it itself; --check verifies committed data in CI.
  • Release workflow: pushing a tag vX.Y.Z publishes a GitHub Release
    with world-geojson-vX.Y.Z-{ISO3}.zip per territory,
    world-geojson-vX.Y.Z-all.zip, index.json and SHA256SUMS, with the
    matching section of this changelog as its notes.
  • CITATION.cff at the repository root.
  • build_data.py --resplit, which re-derives parents and split parts from the
    committed files after a shapeISO correction, without a rebuild from
    source.
  • Validation upgrades in validate_data.py: JSON Schema validation of every
    manifest, the index, the registry and every feature of every
    full-resolution file; feature ids unique per file; every parentID
    resolves; in-file bbox equals the coordinates; manifest feature counts
    equal the files; --checksums re-hashes every file. CI also runs
    finalize_geojson.py --check and build_index.py --check.

Changed — breaking against the unreleased 0.x main

No tag existed, so nothing was pinned; code written against main should
still know:

  • shapeISO no longer carries geoBoundaries' opaque id where the upstream
    has no code. It is "" on 15,364 features across 22 municipal datasets
    (14,797 ADM2, 501 ADM3, all 66 ADM4); src_shape_id keeps the upstream id.
  • Three upstream codes corrected from scripts/shapeiso_fixes.json —
    South Dakota SU-SD → US-SD, Ciudad de México MX-MEX → MX-CMX,
    Cotopaxi EC-H → EC-X — and Belize's ADM2 codes cleared, since they
    repeated the district's. shapeISO is now unique within every level where
    it is non-empty.
  • The split parts follow the corrected codes: USA/ADM2/SU-SD.geojson is now
    US-SD.geojson (66 counties); MEX/ADM2/MX-CMX.geojson (16 alcaldías) and
    ECU/ADM2/EC-X.geojson (7 cantons) are new, and MX-MEX.geojson (now 125
    municipios) and EC-H.geojson (now 10 cantons) shrank accordingly.
  • Every full-resolution file and preview was rewritten in the canonical
    layout, so the bytes and sha256 of every file, and every manifest,
    changed. Geometry is unchanged.

Fixed — data contract v1

  • The in-file bbox of 13 files was the pre-simplification extent; it now
    equals the coordinates in every file, and CI checks it.
  • Previews now carry the feature id, so a map drawn from a preview joins to
    the full data.

Added — engineering hygiene

  • pyproject.toml with ruff, mypy and pytest configuration, and a
    tests/ suite for the pipeline scripts.
  • justfile, .pre-commit-config.yaml and .editorconfig.
  • CI workflow ci.yml running lint and tests on every pull request;
    validate-data now also runs on pushes to main.

Fixed — pipeline and site

  • The docs site lost its preview maps: the docs workflow's sparse checkout
    excluded the preview/ files the maps are served from.
  • fetch_sources.py downloaded the 297 MB Chile archive for every scope, not
    only when Chile was requested, and extracted it even under --dry-run.
  • build_data.py exited 0 after failures.
  • validate_data.py --help ran the whole validation instead of printing help,
    and checked the required properties on the first feature of each file only;
    it now checks every feature.
  • gen_catalog.py missed a changed preview when the new file had the same size
    as the old one.
  • make_previews.mjs processed its inputs in filesystem order, so output was
    not reproducible across platforms.

Docs

  • Every page under Reference and About brought in line with the data as
    shipped: the property set actually present (src_shape_id, where adm1ISO
    and parentISO exist; shapeID and shapeNameEn never did), the real
    manifest fields, the split rules and unsplit territories, Chile's four
    levels, the known shapeISO issues, and the platform roadmap.

Added — the Americas

  • 55 territories, 95 datasets, 16,195 features. Country outlines from
    Natural Earth 10m (public domain); first-level and municipal divisions from
    geoBoundaries gbOpen, permissive licences only; Chile from IDE Chile.
  • Municipal levels are split by first-level parent. The parent is derived by
    largest-overlap spatial join, because geoBoundaries carries no parent
    reference and frequently ships an empty shapeISO.
  • Each dataset records its own licence, upstream provider and vintage. A
    country-level licence would be a false claim: Brazil's outline is public
    domain, its states CC BY 2.5 and its municipalities CC BY 3.0 IGO.
  • mapshaper is pinned in package.json and installed locally rather than
    resolved through npx on every call.

Not included, and why. Fifteen countries have no first-level divisions
because their geoBoundaries ADM1 is ODbL or CC-BY-SA. Bonaire/Sint Eustatius
and Saba and Bouvet Island ship nothing at all. Jamaica's and Saint Lucia's
ADM2 were left out as apparently mis-tiered — 827 units against 14 parishes,
547 against 10 quarters. See the Roadmap.

Upstream quirks worth knowing. geoBoundaries' admUnitCount metadata
disagrees with the files it serves in several cases (Suriname reports 62 ADM2
units and ships 58); the counts here are what the files actually contain.
Argentina's ADM1 omits the Autonomous City of Buenos Aires, so its 8 comunas
overlap no province and are kept in an unassigned part rather than dropped.
Ecuador and Peru each ship an ADM1 whose shapeISO contains an asterisk.

Added — data pipeline and Chile

  • Chile at data/earth/CHL/, from IDE Chile's División Política
    Administrativa
    2023 under CC BY: 16 regions, 56 provinces and 345 communes.
    The provincial tier had no openly licensed source before now.
  • The municipal level is split by region into 16 files so no single file is
    unwieldy, plus a whole-country file where it fits under the CDN ceiling.
  • Ingestion pipeline: fetch_sources.py, build_data.py,
    build_manifest.py, make_previews.mjs, and a curated
    scripts/countries.json recording which ADM level is each country's
    municipal tier.
  • All geometry simplified to a 100 m ground tolerance, recorded per dataset
    in the manifest. A distance rather than a percentage, so the whole repository
    shares one real-world resolution.
  • validate-data.yml — checks manifests against a clean regeneration, verifies
    split parts sum to the level total, enforces size budgets, and rejects any
    source.license outside the permissive allow-list.
  • Interactive preview maps, served from the docs site itself so they work under
    mkdocs serve and during PR review rather than depending on CDN propagation.

Changed

  • Chile's source moved from BCN to IDE Chile DPA 2023. geoBoundaries was
    evaluated and rejected for Chile: its ADM2 is OpenStreetMap under ODbL, and
    its communes are a 2020 vintage.
  • geoBoundaries is no longer described as a CC BY 4.0 source. gbOpen is a
    container of per-file licences and 33% of its Americas entries are copyleft.
    contributing/sources.md was wrong and has been corrected.
  • Natural Earth is now the designated source for country outlines.

Deprecated

  • regiones.geojson, comunas.geojson and their .json duplicates remain at
    the repository root, unchanged, for one full major version. They are not
    byte-equivalent to their replacements — different source, schema and
    resolution.

Added — documentation site

  • Documentation site built with MkDocs and Material for MkDocs, deployed to
    GitHub Pages.
  • Written conventions for repository layout, administrative levels, property
    schema, coordinate reference systems and planetary bodies.
  • Approved-source list and licensing policy, including the explicit exclusion
    of GADM and the share-alike problem with OpenStreetMap.
  • Disputed-boundaries policy.
  • Code of conduct.
  • Catalog generator (scripts/gen_catalog.py) producing dataset pages from
    manifest.json sidecars.
  • CI workflow building the site with --strict on pull requests and deploying
    to GitHub Pages on main.

Fixed

  • .gitattributes now pins *.geojson to LF line endings. Previously
    * text=auto caused CRLF conversion on Windows checkout, making the working
    file 1.8 MB larger than the stored blob and producing checksums that could
    not match Linux CI or raw.githubusercontent.com.

Planned — breaking

The legacy root files are removed in the next major release. See
Versioning & stability.