Course · ← 0007 Model the System · 0009 Georeferencing → · engine layer

Lesson 0008 · ~14 minutes

Spatial Reference

Lesson 0005 said "wrong CRS fails silently" and moved on. This is the part underneath: ellipsoid, datum, projection, and the transformation step everyone forgets until parcels sit a hundred metres from the road.

Four things stacked

A spatial reference is not one thing. It is a stack, and every layer of it can be wrong independently.

  1. Ellipsoid (spheroid) A mathematical approximation of the earth's shape. WGS 84, GRS 80, Krasovsky, Clarke 1880 — each a different size and flattening.
  2. Datum The ellipsoid plus how it is tied to the actual earth. Each geographic coordinate system has a spheroid setting size and shape, and each is tied to the earth in a particular way — so the same physical location has different coordinate values under different systems.1
  3. Coordinate system Geographic (GCS): angles on the ellipsoid — latitude/longitude, e.g. WGS 84 / EPSG:4326. Projected (PCS): the ellipsoid flattened onto a plane, x/y in metres, e.g. a UTM zone or a national grid.2
  4. Identifier EPSG codes, published in the EPSG Geodetic Parameter Dataset — the most common mechanism for publishing coordinate system definitions in machine-readable form.3 The full definition travels as WKT. Esri also issues its own WKIDs; the number ranges do not overlap with EPSG's.1
The distinction that costs the most

Projection is not transformation. Reprojecting within one datum — geographic to projected, or between projections — is exact mathematics, lossless and uncontroversial. Moving between datums is a geographic (datum) transformation: an empirical, approximate, region-specific calculation with its own accuracy.4 Software will happily skip it and draw your data anyway — shifted by anything from a few metres to a few hundred.

Why this is a cadastral problem, not a mapping one

Most countries' cadastral data predates GPS. It sits on a local datum, computed from a national triangulation network, chosen decades ago because it fitted that country well. Your imagery and your field GNSS are on WGS 84. Those are different datums, and the offset between them is systematic — every parcel wrong by the same amount in the same direction, which is precisely the error the human eye does not catch.

Systematic error is invisible on screen: everything looks internally consistent, parcels fit their neighbours, the map "works". It only surfaces when your layer meets someone else's — a road centreline, a utility corridor, a neighbouring district captured by a different contractor.

Three defensive habits:

Declare, never assume. Data with no declared CRS is not data yet. If a contractor delivers a shapefile without a .prj, the deliverable is incomplete — ask, do not guess.

Name the transformation explicitly. Not just "we converted to WGS 84" but which transformation, with which parameters. Multiple transformations exist between the same pair of datums, at different accuracies for different regions. This belongs in your metadata and your technical proposal.

Test against control. Take a handful of points whose coordinates are known in both systems — a survey mark, a road junction, a building corner — and round-trip them. Systematic offset shows up immediately and nowhere else.

What to store, what to serve

WhereCRSWhy
Cadastral storageNational projected gridMetres, minimal local distortion, areas and distances mean something
Exchange / APIWGS 84 (EPSG:4326)Universal, GeoJSON's default, no datum ambiguity
Web basemap tilesWeb Mercator (3857)What tile pyramids use — display only
Field GNSS captureWGS 84, transformed on ingestTransform once, at a known point in the pipeline, and record that you did

In PostGIS this is enforced by the column: geometry(Polygon, 32637) refuses anything in the wrong SRID rather than silently accepting it. Take that constraint. The alternative — a mixed-SRID table — is a class of bug that survives for years.


Drill 1 — Projection or transformation?

Does this operation stay within one datum (pure projection) or cross datums (needs a transformation)?

Drill 2 — Recall


Your primary source

EPSG Guidance Note 373-07-1 — Understanding the EPSG Geodetic Parameter Dataset (IOGP). The authoritative account of what a CRS definition contains and how transformations are published:
iogp.org — Guidance Note 373-07-1 (PDF)

Lighter, and good for orienting first: Esri's "Coordinate Systems: What's the Difference?" and, for a programmer's framing, Geographic Coordinate Systems 101.

Ask your teacher. Worth pushing on: "which transformation should I use for country X?", "how do I enforce SRID discipline in PostGIS?", "what accuracy does a datum transformation itself have?" — that last one matters, because it can exceed your parcel accuracy budget from lesson 0002.