Skip to content

Geo Grid Codelist

A Geo Grid Codelist is a codelist whose codes are cells of a regular geographic grid. The grid is described once, on the codelist, by a grid definition, and each code names its cell. It is written like a Codelist, with one extra scheme field and one extra field on each code. A geo grid codelist document starts ref: "GeoGridCodelist=AGENCY:ID(1.0)".

Simple form

The document is the common header, the grid definition, then the codes. Every geo grid code carries a cell, so a geo grid code is always written as an object; the ID: "name" simple form of an item is never used.

format: "fusion-yaml(1.0.0)"
ref: "GeoGridCodelist=ACY:CL_REF_AREA(1.0)"
name: "TEST"
gridDefinition: "4326:UL;9.580078,55.103516;1000,1000:W3W"
items:
- UK:
    name: "UK-name"
    geoCell: "0,1"

Source: geogridcodelist/testGeoCode.yaml

  • gridDefinition is the grid definition of the codelist, written as a string exactly as held on the codelist.
  • items is the list of codes, in the order they are held in the codelist.
  • geoCell is the cell of the grid that the code represents, written as a string.

Complex form

A geo grid code can also have names in other locales, descriptions, a URI, a parent, annotations and links. The scheme can be partial and can have inheritance rules, exactly as for a Codelist.

format: "fusion-yaml(1.0.0)"
ref: "GeoGridCodelist=ACY:CL_REF_AREA(1.0)"
name: "Grid"
partial: true
gridDefinition: "4326:UL;9.580078,55.103516;1000,1000:W3W"
items:
- G0:
    name: "Grid region"
    geoCell: "0,0"
- G1:
    name: "Cell 0,1"
    description: "North west cell"
    parent: "G0"
    geoCell: "0,1"
    annotations:
    - id: "NOTE"
      title: "Coastal"

Constructed from the field order in GeoGridCodelistCanonicalWriter.

Inside a code object the fields are written in this order: names and descriptions, uri, parent, validity, geoCell, annotations, links.

As in a Codelist, a code with a validity period writes it as validity, for example validity: "1990/2000".

Field reference

Body fields, written after the common header:

Field Value Written when
partial true The codelist is partial.
gridDefinition String The codelist has a grid definition.
inheritance Array of inheritance rule objects, see Codelist The codelist inherits from at least one codelist.
items Array of ID: {object} The codelist has at least one code.

Code object fields (items[].<ID>):

Field Value Written when
name, name-<locale> String The code has a name in that locale.
description, description-<locale> String The code has a description in that locale.
uri String The code has a URI.
parent Id of the parent code The code has a parent.
validity Validity period, e.g. "1990/2000" The code has a validity period.
geoCell String Always (it is required).
annotations Array, see annotations The code has annotations.
links Array, see links The code has links.

Stub

A stub geo grid codelist keeps its grid definition. After the stub header (including any annotations and links) the gridDefinition field is written:

format: "fusion-yaml(1.0.0)"
ref: "GeoGridCodelist=ACY:CL_REF_AREA(1.0)"
url: "https://sdmx.stub.com"
name: "TEST"
annotations:
- id: "ANN"
  title: "Stub test"
gridDefinition: "4326:UL;9.580078,55.103516;1000,1000:W3W"

Source: geogridcodelist/testCompleteStub.yaml