Coordinate reference systems¶
The rule¶
All Earth data in this repository is OGC:CRS84 — longitude and latitude in decimal degrees on the WGS 84 datum. This is numerically identical to EPSG:4326 with the axis order that GeoJSON mandates.
Longitude first. EPSG:4326 formally defines latitude first; GeoJSON overrides this. Reversing the pair is the single most common error in hand-edited GeoJSON, and it fails quietly — the geometry renders, just in the wrong hemisphere.
The crs member is forbidden¶
RFC 7946 §4 states that all GeoJSON coordinates are in WGS 84, and the
specification removed the crs member that the 2008 draft allowed. A
conforming file cannot declare its coordinate system, because there is only one
permitted answer.
So: no file in this repository contains a crs member. The authoritative
declaration lives out of band, in the dataset's
manifest.json:
That field exists because it is genuinely load-bearing for planetary data, where the coordinates are not WGS 84 and the file cannot say so. See Planetary bodies.
Coordinate precision¶
Coordinates must not exceed 6 decimal places — approximately 11 cm at
the equator. Every file under data/ complies: full files are written at 6
decimals, previews at 4, one feature per line.
| Decimals | Precision at equator |
|---|---|
| 3 | 110 m |
| 4 | 11 m |
| 5 | 1.1 m |
| 6 | 11 cm |
Six is generous for administrative boundaries.
The legacy root files are the counter-example
regiones.geojson and comunas.geojson at the repository root store
around 14 decimal places (-69.31688314070382), pretty-printed with
4-space indentation. That is nanometre precision on boundaries surveyed
to, at best, metre accuracy — the same accuracy with eight digits of noise
attached, and those digits are a large part of why comunas.geojson is
72 MB where CHL_ADM3.geojson is 7 MB. They are deprecated; see
Versioning & stability.
The bbox member¶
Every FeatureCollection must carry a top-level bbox, and every file
under data/ does — CI checks for it:
Order is [west, south, east, north]. It lets a consumer decide whether to
download the file at all, and lets a map fit its view without parsing the whole
geometry. (The legacy root files have none.)
It always matches the coordinates in the file: the finalize step recomputes it
from the geometry as written — mapshaper had left the pre-simplification
extent in 13 files — and CI fails any file whose bbox disagrees with its
coordinates. It is the naive minimum and maximum over every coordinate, which
has one consequence, below.
Winding order¶
RFC 7946 §3.1.6 requires the right-hand rule: exterior rings counterclockwise, interior rings (holes) clockwise. Many tools ignore this on read, but some — notably several vector-tile pipelines and MongoDB's geospatial indexes — do not, and will treat a wrongly-wound polygon as covering the entire planet minus your shape.
mapshaper rewinds correctly on output. Verify rather than assume.
The antimeridian¶
RFC 7946 §3.1.9: geometries crossing 180° longitude should be cut in two at the antimeridian rather than using coordinates outside the −180…180 range.
The pipeline does this: wgj finalize cuts every polygon that runs past 180°,
or jumps from about +180° to −180° between two vertices, into pieces on either
side, and wgj validate fails on any longitude outside −180…180. Natural
Earth and geoBoundaries already deliver their files cut, so the step has
changed no published file so far, Oceania's included. Besides the United
States and Russia, the files that span 180° are Fiji's, Kiribati's, New
Zealand's (the Chatham Islands) and the US Minor Outlying Islands'.
This is not hypothetical:
- The United States crosses it — Alaska's Aleutian Islands extend past
180°. RFC 7946 §5.2 allows a
bboxwith west greater than east for such geometry, but the files here do not use that form: the file'sbboxand the manifest's are both a naive min/max, andUSA_ADM0.geojsonand its manifest entry alike read[-179.14…, 18.90…, 179.78…, 71.41…]— nearly the whole globe. Fitting a map to it works, but zooms out to the world; do not use thebboxto decide whether a country touches your area of interest near 180°. - Isla de Pascua sits at about 109°W — well inside range, but far enough from the mainland that Chile's bounding box spans a third of the planet.
- Polar geometry. Chile's Antarctic claim would extend to the South Pole, but the DPA package excludes it, so nothing in the current files reaches beyond 56.6°S. Polygons that include a pole are a known failure mode for renderers and for point-in-polygon tests, quite separately from the antimeridian question.
Any dataset including polar or antimeridian-crossing geometry must note it in the manifest so consumers are not surprised.
Reprojection¶
Do not compute areas or distances in degrees. A degree of longitude is 111 km at the equator and 0 at the poles; area in "square degrees" is not a quantity.
Reproject to something appropriate for your area of interest first — for Chile, EPSG:5361 (SIRGAS-Chile). See Recipes.
Data must be stored in CRS84 regardless. Reprojection is the consumer's job; storing anything else would make the files non-conforming.