Geographic Codelist¶
A Geographic Codelist is a codelist whose codes each describe a geographic feature through a geo feature set (a set of
coordinates or shapes). It is written like a Codelist, with one extra field on each code. A geographic
codelist document starts ref: "GeographicCodelist=AGENCY:ID(1.0)".
Simple form¶
The document is the common header followed by the codes. Every geographic code
carries a geo feature set, so a geographic 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: "GeographicCodelist=ACY:CL_GEO(1.0)"
name: "TEST"
items:
- UK:
name: "UK-name"
geoFeatureSet: "asd"
Source: geographiccodelist/testGeoFeature.yaml
itemsis the list of geographic codes, in the order they are held in the codelist.geoFeatureSetis the geo feature set of the code, written as a string exactly as held on the code.
Complex form¶
A geographic 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: "GeographicCodelist=ACY:CL_GEO(1.0)"
name: "Geography"
items:
- EUR:
name: "Europe"
geoFeatureSet: "{[-10.0,35.0],[40.0,71.0]}"
- UK:
name: "United Kingdom"
name-fr: "Royaume-Uni"
description: "England, Scotland, Wales and Northern Ireland"
uri: "https://example.org/geo/UK"
parent: "EUR"
geoFeatureSet: "{[-0.1276,51.5072]}"
annotations:
- id: "NOTE"
title: "Capital coordinates"
Constructed from the field order in GeographicCodelistCanonicalWriter.
Inside a code object the fields are written in this order: names and descriptions, uri, parent, validity, geoFeatureSet,
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. |
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. |
geoFeatureSet |
String | Always (it is required). |
annotations |
Array, see annotations | The code has annotations. |
links |
Array, see links | The code has links. |