Places and shapes

How ODS carries spatial data: GeoJSON, the coordinate reference system in full, the accuracy and origin of a position, other ways to state a place, and the original dataset.

Draft

The rules can still change before the first release.

ODS is not a GIS. It does not edit, analyse or serve spatial data. It records where things are, so that a GIS and a calculation can use the places and shapes with no loss of accuracy. This page states how.

Record Holds
Location One place: a point with its heights, and other ways to state the place.
Geometry A shape, as a GeoJSON geometry (RFC 7946).
Crs How to read the coordinates and heights (ISO 19111).
Positioning How a position was obtained and how accurate it is (ISO 19157).
Geographic identifier A place stated by a name or an id (ISO 19112).
Linear reference A place stated as a distance along a line (ISO 19148).
Original The dataset that a shape was converted from, and what the conversion changed.

A grid or a raster is a Value with spatial axes and a crs (conventions, section 5). This page does not change it.

1. Coordinates

  • A point and a shape are GeoJSON (RFC 7946). GeoJSON is the shape that every reader can read.
  • Coordinates are in GeoJSON order for every coordinate reference system: x then y, then an optional z. That is easting then northing, or longitude then latitude. The axis order in the definition of a system does not change this order.
  • A record with no crs has WGS 84 longitude and latitude (EPSG:4326).
  • A Location's relativeHeight and absoluteHeight are in metres.

2. The coordinate reference system

A Crs identifies its system in one of four ways. It has at least one.

Field Use
epsgCode The EPSG code as a number, such as 3400.
code The code in any registry, as <authority>:<code>, such as EPSG:3400 or ESRI:102184.
wkt The full definition as WKT 2 (ISO 19162), for a system that no registry holds, such as a site grid.
projjson The full definition as PROJJSON.
  • epsgCode: 3400 and code: "EPSG:3400" mean the same. A Crs can have both. When it has both, they name the same system (crs.conflict, validation).
  • When a Crs has a code and a definition, the definition is a copy for a reader that cannot look up the code. The code is the identity.
  • The vertical system is verticalDatum (a short list of datums) or verticalCode (the code of a vertical system in a registry, such as EPSG:6647). A compound code in code can also name both systems.
  • coordinateEpoch is the date that the coordinates are true for, as a decimal year (ISO 19111, coordinate epoch). A system that is not fixed to the ground, such as WGS 84 or ITRF2020, needs it. The WGS 84 and the NAD83(CSRS) coordinates of one place differ by more than a metre, and the difference grows each year, so a conversion between them needs the epoch.

The validator does not read a WKT or a PROJJSON definition, and it does not look up a code in a registry.

3. Accuracy and origin of a position

A Location and a Geometry can have a positioning.

  • horizontalAccuracy and verticalAccuracy are in metres. They are absolute positional accuracy (ISO 19157): the true position is within this distance of the stated position, at the confidenceLevel.
  • confidenceLevel is in percent. A producer leaves it out when the origin of the accuracy does not state it. A reader does not assume one.
  • method is a code of core/positioning_methods, such as surveyed, gnss_rtk, digitized or geocoded. unknown is a method.
  • determinedAt is when the position was obtained.
  • evidence points at the Evidence that the position rests on, such as a survey. citation names a published work or dataset.
  • For a Geometry, the accuracy applies to each position of the shape.

A missing positioning means that the accuracy is not stated. It does not mean that the position is exact.

4. Other ways to state a place

A Location can state its place beside the coordinates:

  • geographicIdentifiers: a legal land description, a parcel id, a civic address, a place name, or a feature of a named dataset and edition. Each has a type and a value. A legal land description and a parcel id name their scheme, such as ca.dls (the Dominion Land Survey, which the Alberta Township Survey follows) or ca.bc.nts (the National Topographic System grid in British Columbia). A feature of a dataset names its dataset, with the edition.
  • linearReference: a distance along a line, such as a kilometre post on a pipeline. line is the id of a record in the document whose geometry is the line (linear.line, validation).

A Location can have no point. A place that is known only by its legal land description, its address or its distance along a line has no coordinates. A Location has a point, a geographic identifier or a linear reference: at least one.

  • A producer does not make a point to fill the field. When it calculates a point from a legal land description, it writes the point with the positioning method legal_description and the accuracy that follows.
  • A reader that needs coordinates treats a Location with no point as a place with no coordinates. It does not guess.
  • Every Location written before this rule has a point, so it stays valid.

A dwelling's address and parcel are personal information, as its location is (conventions, section 6).

5. The original dataset

GeoJSON cannot hold curves, surfaces or solids. A Geometry or a Location that was converted from another dataset can keep its original:

  • file points at the File that holds the dataset: a GeoPackage, a shapefile archive, a GML, CityGML, IFC, KML or DXF file, or a WKT or WKB file. The file is in the package like any other file, with its media type and its hash (package format).
  • layer and feature name the layer and the feature in the dataset.
  • geometryType is the sort of shape in the original, as its format names it, such as CurvePolygon.
  • crs is the coordinate reference system of the original, when the conversion changed it.
  • changes lists what the conversion changed, each with a code of core/geometry_changes: curves turned into segments, reprojected, simplified, heights dropped, a solid reduced to its footprint. A change can state its tolerance in metres. An empty list means that the conversion changed nothing. A missing list means that the changes are not known.

A calculation that needs the exact shape reads the original. A reader that cannot read the original uses the GeoJSON shape, and knows from changes how far it can be from the original.