diff --git a/examples/0-20008-0-THE.json b/examples/0-20008-0-THE.json index dcbacb9..fab5bbd 100644 --- a/examples/0-20008-0-THE.json +++ b/examples/0-20008-0-THE.json @@ -20,10 +20,13 @@ ], "properties": { "type": "facility", + "facilityType": { + "id": "landFixed" + }, "title": "Thessaloniki", "created": "2024-12-11T00:00:00Z", "updated": "2024-12-11T00:00:00Z", - "description": "The Brewer spectrophotometers and all radaition instruments are located on the roof of the 4-storey building of the Physics Dept., of the Aristotle University of Thessaloniki. The Campus is located in the city center about 500 m east of the seashore. The highest elevation of about 1100 m is at a distance of about 15 km towards the east. Thessaloniki is the second largest city of Greece with about 1000000 inhabitants in the greater metropolitan area.", + "description": "The Brewer spectrophotometers and all radiation instruments are located on the roof of the 4-storey building of the Physics Dept., of the Aristotle University of Thessaloniki. The Campus is located in the city center about 500 m east of the seashore. The highest elevation of about 1100 m is at a distance of about 15 km towards the east. Thessaloniki is the second largest city of Greece with about 1000000 inhabitants in the greater metropolitan area.", "contacts": [ { "identifier": "contact:aristotle-university-of-thessaloniki--ed7b7e4a", @@ -85,63 +88,81 @@ ] } ], - "facilityType": "landFixed", - "wmoRegion": "europe", - "programAffiliations": [ - { - "dates": [ - "1982-03-13", - ".." - ], - "programAffiliation": "GAWregional", - "facilityId": "THE", - "reportingStatus": "operational" - }, - { - "dates":[ - "2008-01-01", - "2024-12-11" - ], - "programAffiliation": "GALION", - "facilityId": "THE", - "reportingStatus": "operational" - }, - { - "dates": [ - "2003-06-01", - "2024-12-11" - ], - "programAffiliation": "AERONET", - "facilityId": "Thessaloniki", - "reportingStatus": "operational" - } - ], + "wmoRegion": { + "id": "europe" + }, "territories": [ { - "dates": ["2011-02-16", ".."], - "territory": "GRC" - } - ], - "deployments": [ - { - "id": "deployment:123", - "instrument": "instrument:456", - "sourceOfObservation": "automaticReading", - "time": { - "interval": [ - "1982-03-13", - ".." - ] - } + "dates": [ + "2011-02-16", + ".." + ], + "territory": {"id": "GRC"} } ], - "instruments": [ + "observations": [ { - "id": "instrument:456", - "observingCapabilities": [{ - "observingMethod": "78", - "observedProperty": "12164" - }] + "observedProperty": { + "id": "12164" + }, + "programAffiliations": [ + { + "dates": [ + "1982-03-13", + ".." + ], + "programAffiliation": { + "id": "GAWregional" + }, + "reportingStatus": { + "id": "operational" + } + }, + { + "dates": [ + "2008-01-01", + "2024-12-11" + ], + "programAffiliation": { + "id": "GALION" + }, + "reportingStatus": { + "id": "operational" + } + }, + { + "dates": [ + "2003-06-01", + "2024-12-11" + ], + "programAffiliation": { + "id": "AERONET" + }, + "reportingStatus": { + "id": "operational" + } + } + ], + "configurations": [ + { + "id": "configuration-456", + "time": { + "interval": [ + "1982-03-13", + ".." + ] + }, + "observingMethod": { + "id": "78" + }, + "sourceOfObservation": { + "id": "automaticReading" + }, + "instrument": { + "id": "instrument-789" + } + } + ] } ] }, diff --git a/schemas/configurations.yaml b/schemas/configurations.yaml new file mode 100644 index 0000000..584061b --- /dev/null +++ b/schemas/configurations.yaml @@ -0,0 +1,62 @@ +--- +type: object +properties: + id: + type: + - string + - integer + description: configuration identifier + geometry: + $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/pointGeoJSON.yaml' + time: + $ref: 'https://raw.githubusercontent.com/wmo-im/wcmp2/refs/heads/main/schemas/wcmpRecordGeoJSON.yaml#/properties/time' + observingMethod: + allOf: + - $ref: 'definitions.yaml#/concept_or_null' + description: observing method + $comment: |- + - https://codes.wmo.int/wmdr/ObservingMethodAtmosphere + - https://codes.wmo.int/wmdr/ObservingMethodTerrestrial + - https://codes.wmo.int/wmdr/ObservingMethodOcean + operatingStatus: + allOf: + - $ref: 'definitions.yaml#/concept_or_null' + description: operating status + $comment: |- + - https://codes.wmo.int/wmdr/InstrumentOperatingStatus + sourceOfObservation: + allOf: + - $ref: 'definitions.yaml#/concept_or_null' + description: Source of observation + $comment: https://codes.wmo.int/wmdr/SourceOfObservation + instrument: + $ref: 'instrument.yaml' + instrumentSerialNumber: + type: string + description: instrument serial number + verticalDistance: + type: object + properties: + distances: + type: array + description: Signed vertical distances from reference surface + minItems: 1 + items: + type: number + unit: + allOf: + - $ref: 'definitions.yaml#/concept_or_null' + description: Measurement unit + $comment: https://codes.wmo.int/wmdr/unit + referenceSurface: + allOf: + - $ref: 'definitions.yaml#/concept_or_null' + description: Type of reference surface + $comment: https://codes.wmo.int/wmdr/ReferenceSurfaceType + required: + - distances + - unit + - referenceSurface +required: + - id + - time diff --git a/schemas/definitions.yaml b/schemas/definitions.yaml new file mode 100644 index 0000000..f85757b --- /dev/null +++ b/schemas/definitions.yaml @@ -0,0 +1,5 @@ +concept_or_null: + oneOf: + - $ref: 'https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/theme.yaml#/properties/concepts/items' + - enum: + - null diff --git a/schemas/deployment.yaml b/schemas/deployment.yaml deleted file mode 100644 index bf299ca..0000000 --- a/schemas/deployment.yaml +++ /dev/null @@ -1,39 +0,0 @@ ---- -type: object -properties: - id: - oneOf: - - type: string - - type: integer - description: deployment identifier - geometry: - $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/pointGeoJSON.yaml' - time: - $ref: 'https://raw.githubusercontent.com/wmo-im/wcmp2/refs/heads/main/schemas/wcmpRecordGeoJSON.yaml#/properties/time' - instrument: - type: string - description: instrument identifier - sourceOfObservation: - type: string - description: Source of observation - $comment: https://codes.wmo.int/wmdr/SourceOfObservation - referenceSurfaces: - type: array - minItems: 1 - items: - tye: object - properties: - referenceSurface: - type: string - description: Type of reference surface - $comment: https://codes.wmo.int/wmdr/ReferenceSurfaceType - verticalDistance: - type: number - description: Height above reference surface - required: - - referenceSurface - - verticalDistance - keywords: - $ref: 'https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/recordCommonProperties.yaml#/properties/keywords' -required: - - id diff --git a/schemas/instrument.yaml b/schemas/instrument.yaml index cdd6a95..3f2235e 100644 --- a/schemas/instrument.yaml +++ b/schemas/instrument.yaml @@ -2,44 +2,15 @@ type: object properties: id: - oneOf: - - type: string - - type: integer + type: + - string + - integer description: instrument identifier - observingCapabilities: - type: array - minItems: 1 - items: - type: object - properties: - observingMethod: - type: string - description: observing method - $comment: |- - - https://codes.wmo.int/wmdr/ObservingMethodAtmosphere - - https://codes.wmo.int/wmdr/ObservingMethodTerrestrial - - https://codes.wmo.int/wmdr/ObservingMethodEarth - observedProperty: - type: string - description: observed property - $comment: |- - - https://codes.wmo.int/wmdr/ObservedVariableAtmosphere - - https://codes.wmo.int/wmdr/ObservedVariableEarth - - https://codes.wmo.int/wmdr/ObservedVariableOcean - - https://codes.wmo.int/wmdr/ObservedVariableOuterSpace - - https://codes.wmo.int/wmdr/ObservedVariableTerrestrial - required: - - observingMethod - - observedProperty manufacturer: type: string description: instrument manufacturer model: type: string description: instrument model - serialNumber: - type: string - description: instrument serial number required: - id - - observingCapabilities diff --git a/schemas/observations.yaml b/schemas/observations.yaml new file mode 100644 index 0000000..aa027ab --- /dev/null +++ b/schemas/observations.yaml @@ -0,0 +1,47 @@ +--- +type: object +properties: + observedGeometry: + $ref: 'https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/theme.yaml#/properties/concepts/items' + description: observed geometry + $comment: |- + - https://codes.wmo.int/wmdr/Geometry + observedProperty: + $ref: 'https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/theme.yaml#/properties/concepts/items' + description: observed property + $comment: |- + - https://codes.wmo.int/wmdr/ObservedVariableAtmosphere + - https://codes.wmo.int/wmdr/ObservedVariableEarth + - https://codes.wmo.int/wmdr/ObservedVariableOcean + - https://codes.wmo.int/wmdr/ObservedVariableOuterSpace + - https://codes.wmo.int/wmdr/ObservedVariableTerrestrial + programAffiliations: + type: array + description: program affiliations + minItems: 1 + items: + type: object + properties: + programAffiliation: + $ref: 'https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/theme.yaml#/properties/concepts/items' + description: Programme/network affiliation + $comment: https://codes.wmo.int/wmdr/ProgramAffiliation + reportingStatus: + allOf: + - $ref: 'definitions.yaml#/concept_or_null' + description: Station/Platform operating status + $comment: https://codes.wmo.int/wmdr/ReportingStatus + dates: + $ref: 'temporal.yaml#/dates' + required: + - programAffiliation + configurations: + type: array + description: configurations + minItems: 1 + items: + $ref: 'configurations.yaml' +required: + - observedProperty + - programAffiliations + - configurations diff --git a/schemas/temporal.yaml b/schemas/temporal.yaml index 9b7eef5..96ff9f1 100644 --- a/schemas/temporal.yaml +++ b/schemas/temporal.yaml @@ -2,6 +2,7 @@ dates: type: array minItems: 1 + maxItems: 2 items: oneOf: - type: string diff --git a/schemas/wmdr2-bundled.json b/schemas/wmdr2-bundled.json index ef26a14..3aee6f1 100644 --- a/schemas/wmdr2-bundled.json +++ b/schemas/wmdr2-bundled.json @@ -111,36 +111,18 @@ "properties": { "type": "object", "properties": { - "title": { + "type": { "type": "string", - "description": "facility name (primary)" + "description": "record type", + "const": "facility" }, - "additionalTitles": { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "description": "additional facility names" - } - }, - "additionalIds": { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "description": "additional WIGOS Station Identifiers (WSI)", - "pattern": "^(0|1|2|3)-([1-9]\\d*)-([0-9]+)-([A-Za-z0-9\\._-]+)$" - } - }, - "facilityType": { + "title": { "type": "string", - "description": "Station/platform type", - "$comment": "https://codes.wmo.int/wmdr/FacilityType" + "description": "observing facility name (primary)" }, - "wmoRegion": { + "description": { "type": "string", - "description": "WMO Region", - "$comment": "https://codes.wmo.int/wmdr/WMORegion" + "description": "observing facility description" }, "contacts": { "type": "array", @@ -406,29 +388,37 @@ "description": "The most recent date on which the record was changed.", "format": "date-time" }, - "keywords": { + "additionalIds": { "type": "array", - "description": "The topic or topics of the resource. Typically\nrepresented using free-form keywords, tags, key\nphrases, or classification codes.", + "minItems": 1, "items": { - "type": "string" + "type": "string", + "description": "additional WIGOS Station Identifiers (WSI)", + "pattern": "^(0|1|2|3)-([1-9]\\d*)-([0-9]+)-([A-Za-z0-9\\._-]+)$" } }, - "themes": { + "additionalTitles": { "type": "array", - "description": "A knowledge organization system used to classify\nthe resource.", "minItems": 1, "items": { - "type": "object", - "required": [ - "concepts", - "scheme" - ], - "properties": { - "concepts": { - "type": "array", - "description": "One or more entity/concept identifiers from this knowledge\nsystem. it is recommended that a resolvable URI be used for\neach entity/concept identifier.", - "minItems": 1, - "items": { + "type": "string", + "description": "additional observing facility names" + } + }, + "facilityType": { + "allOf": [ + { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0" + } + ], + "description": "Observing facility type", + "$comment": "https://codes.wmo.int/wmdr/FacilityType" + }, + "wmoRegion": { + "allOf": [ + { + "oneOf": [ + { "type": "object", "required": [ "id" @@ -452,14 +442,17 @@ "description": "A URI providing further description of the concept." } } + }, + { + "enum": [ + null + ] } - }, - "scheme": { - "type": "string", - "description": "An identifier for the knowledge organization system used\nto classify the resource. It is recommended that the\nidentifier be a resolvable URI. The list of schemes used\nin a searchable catalog can be determined by inspecting\nthe server's OpenAPI document or, if the server implements\nCQL2, by exposing a queryable (e.g. named `scheme`) and\nenumerating the list of schemes in the queryable's schema\ndefinition." - } + ] } - } + ], + "description": "WMO Region", + "$comment": "https://codes.wmo.int/wmdr/WMORegion" }, "territories": { "type": "array", @@ -469,13 +462,18 @@ "type": "object", "properties": { "territory": { - "type": "string", + "allOf": [ + { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0" + } + ], "description": "Territory of origin of data", "$comment": "https://codes.wmo.int/wmdr/TerritoryName" }, "dates": { "type": "array", "minItems": 1, + "maxItems": 2, "items": { "oneOf": [ { @@ -497,60 +495,21 @@ ] } }, - "programAffiliations": { + "observations": { "type": "array", - "description": "program affiliations", + "description": "observations made at the facility, including the observed geometry and observed property", "minItems": 1, "items": { - "type": "object", - "properties": { - "facilityId": { - "type": "string", - "description": "Programme specific facility identifier" - }, - "facilityTitle": { - "type": "string", - "description": "Programme specific facility name" - }, - "programAffiliation": { - "type": "string", - "description": "Programme/network affiliation", - "$comment": "https://codes.wmo.int/wmdr/ProgramAffiliation" - }, - "reportingStatus": { - "type": "string", - "description": "Station/Platform operating status", - "$comment": "https://codes.wmo.int/wmdr/ReportingStatus" - }, - "dates": { - "$ref": "#/properties/properties/properties/territories/items/properties/dates" - } - } - } - }, - "deployments": { - "type": "array", - "description": "facility deployments (placement / location of specific equipment)", - "minItems": 1, - "items": { - "$ref": "#/definitions/Deployment" - } - }, - "instruments": { - "type": "array", - "description": "facility instruments", - "minItems": 1, - "items": { - "$ref": "#/definitions/Instrument" + "$ref": "#/definitions/Observations" } } }, "required": [ - "contacts", - "created", + "type", "title", - "deployments", - "instruments" + "created", + "contacts", + "observations" ] }, "links": { @@ -615,19 +574,15 @@ "links" ], "definitions": { - "Deployment": { + "Configurations": { "type": "object", "properties": { "id": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - } + "type": [ + "string", + "integer" ], - "description": "deployment identifier" + "description": "configuration identifier" }, "geometry": { "$ref": "#/properties/geometry" @@ -635,98 +590,161 @@ "time": { "$ref": "#/properties/time" }, - "instrument": { - "type": "string", - "description": "instrument identifier" + "observingMethod": { + "allOf": [ + { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0" + } + ], + "description": "observing method", + "$comment": "- https://codes.wmo.int/wmdr/ObservingMethodAtmosphere\n- https://codes.wmo.int/wmdr/ObservingMethodTerrestrial\n- https://codes.wmo.int/wmdr/ObservingMethodOcean" + }, + "operatingStatus": { + "allOf": [ + { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0" + } + ], + "description": "operating status", + "$comment": "- https://codes.wmo.int/wmdr/InstrumentOperatingStatus" }, "sourceOfObservation": { - "type": "string", + "allOf": [ + { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0" + } + ], "description": "Source of observation", "$comment": "https://codes.wmo.int/wmdr/SourceOfObservation" }, - "referenceSurfaces": { - "type": "array", - "minItems": 1, - "items": { - "tye": "object", - "properties": { - "referenceSurface": { - "type": "string", - "description": "Type of reference surface", - "$comment": "https://codes.wmo.int/wmdr/ReferenceSurfaceType" - }, - "verticalDistance": { - "type": "number", - "description": "Height above reference surface" + "instrument": { + "$ref": "#/definitions/Instrument" + }, + "instrumentSerialNumber": { + "type": "string", + "description": "instrument serial number" + }, + "verticalDistance": { + "type": "object", + "properties": { + "distances": { + "type": "array", + "description": "Signed vertical distances from reference surface", + "minItems": 1, + "items": { + "type": "number" } }, - "required": [ - "referenceSurface", - "verticalDistance" - ] - } - }, - "keywords": { - "$ref": "#/properties/properties/properties/keywords" + "unit": { + "allOf": [ + { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0" + } + ], + "description": "Measurement unit", + "$comment": "https://codes.wmo.int/wmdr/unit" + }, + "referenceSurface": { + "allOf": [ + { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0" + } + ], + "description": "Type of reference surface", + "$comment": "https://codes.wmo.int/wmdr/ReferenceSurfaceType" + } + }, + "required": [ + "distances", + "unit", + "referenceSurface" + ] } }, "required": [ - "id" + "id", + "time" ] }, "Instrument": { "type": "object", "properties": { "id": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "integer" - } + "type": [ + "string", + "integer" ], "description": "instrument identifier" }, - "observingCapabilities": { + "manufacturer": { + "type": "string", + "description": "instrument manufacturer" + }, + "model": { + "type": "string", + "description": "instrument model" + } + }, + "required": [ + "id" + ] + }, + "Observations": { + "type": "object", + "properties": { + "observedGeometry": { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0/oneOf/0", + "description": "observed geometry", + "$comment": "- https://codes.wmo.int/wmdr/Geometry" + }, + "observedProperty": { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0/oneOf/0", + "description": "observed property", + "$comment": "- https://codes.wmo.int/wmdr/ObservedVariableAtmosphere\n- https://codes.wmo.int/wmdr/ObservedVariableEarth\n- https://codes.wmo.int/wmdr/ObservedVariableOcean\n- https://codes.wmo.int/wmdr/ObservedVariableOuterSpace\n- https://codes.wmo.int/wmdr/ObservedVariableTerrestrial" + }, + "programAffiliations": { "type": "array", + "description": "program affiliations", "minItems": 1, "items": { "type": "object", "properties": { - "observingMethod": { - "type": "string", - "description": "observing method", - "$comment": "- https://codes.wmo.int/wmdr/ObservingMethodAtmosphere\n- https://codes.wmo.int/wmdr/ObservingMethodTerrestrial\n- https://codes.wmo.int/wmdr/ObservingMethodEarth" + "programAffiliation": { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0/oneOf/0", + "description": "Programme/network affiliation", + "$comment": "https://codes.wmo.int/wmdr/ProgramAffiliation" }, - "observedProperty": { - "type": "string", - "description": "observed property", - "$comment": "- https://codes.wmo.int/wmdr/ObservedVariableAtmosphere\n- https://codes.wmo.int/wmdr/ObservedVariableEarth\n- https://codes.wmo.int/wmdr/ObservedVariableOcean\n- https://codes.wmo.int/wmdr/ObservedVariableOuterSpace\n- https://codes.wmo.int/wmdr/ObservedVariableTerrestrial" + "reportingStatus": { + "allOf": [ + { + "$ref": "#/properties/properties/properties/wmoRegion/allOf/0" + } + ], + "description": "Station/Platform operating status", + "$comment": "https://codes.wmo.int/wmdr/ReportingStatus" + }, + "dates": { + "$ref": "#/properties/properties/properties/territories/items/properties/dates" } }, "required": [ - "observingMethod", - "observedProperty" + "programAffiliation" ] } }, - "manufacturer": { - "type": "string", - "description": "instrument manufacturer" - }, - "model": { - "type": "string", - "description": "instrument model" - }, - "serialNumber": { - "type": "string", - "description": "instrument serial number" + "configurations": { + "type": "array", + "description": "configurations", + "minItems": 1, + "items": { + "$ref": "#/definitions/Configurations" + } } }, "required": [ - "id", - "observingCapabilities" + "observedProperty", + "programAffiliations", + "configurations" ] } } diff --git a/schemas/wmdrRecordGeoJSON.yaml b/schemas/wmdrRecordGeoJSON.yaml index 71d9a7c..54a5f42 100644 --- a/schemas/wmdrRecordGeoJSON.yaml +++ b/schemas/wmdrRecordGeoJSON.yaml @@ -18,34 +18,19 @@ properties: $ref: 'https://schemas.opengis.net/ogcapi/features/part1/1.0/openapi/schemas/pointGeoJSON.yaml' time: $ref: 'https://raw.githubusercontent.com/wmo-im/wcmp2/refs/heads/main/schemas/wcmpRecordGeoJSON.yaml#/properties/time' - properties: type: object properties: - title: + type: type: string - description: facility name (primary) - additionalTitles: - type: array - minItems: 1 - items: - type: string - description: additional facility names - additionalIds: - type: array - minItems: 1 - items: - type: string - description: additional WIGOS Station Identifiers (WSI) - pattern: "^(0|1|2|3)-([1-9]\\d*)-([0-9]+)-([A-Za-z0-9\\._-]+)$" - facilityType: + description: record type + const: facility + title: type: string - description: Station/platform type - $comment: https://codes.wmo.int/wmdr/FacilityType - wmoRegion: + description: observing facility name (primary) + description: type: string - description: WMO Region - $comment: https://codes.wmo.int/wmdr/WMORegion + description: observing facility description contacts: type: array minItems: 1 @@ -61,10 +46,29 @@ properties: $ref: 'https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/recordCommonProperties.yaml#/properties/created' updated: $ref: 'https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/recordCommonProperties.yaml#/properties/updated' - keywords: - $ref: 'https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/recordCommonProperties.yaml#/properties/keywords' - themes: - $ref: 'https://schemas.opengis.net/ogcapi/records/part1/1.0/openapi/schemas/recordCommonProperties.yaml#/properties/themes' + additionalIds: + type: array + minItems: 1 + items: + type: string + description: additional WIGOS Station Identifiers (WSI) + pattern: "^(0|1|2|3)-([1-9]\\d*)-([0-9]+)-([A-Za-z0-9\\._-]+)$" + additionalTitles: + type: array + minItems: 1 + items: + type: string + description: additional observing facility names + facilityType: + allOf: + - $ref: 'definitions.yaml#/concept_or_null' + description: Observing facility type + $comment: https://codes.wmo.int/wmdr/FacilityType + wmoRegion: + allOf: + - $ref: 'definitions.yaml#/concept_or_null' + description: WMO Region + $comment: https://codes.wmo.int/wmdr/WMORegion territories: type: array description: time series of territories @@ -73,55 +77,26 @@ properties: type: object properties: territory: - type: string + allOf: + - $ref: 'definitions.yaml#/concept_or_null' description: Territory of origin of data $comment: https://codes.wmo.int/wmdr/TerritoryName dates: $ref: 'temporal.yaml#/dates' required: - territory - programAffiliations: - type: array - description: program affiliations - minItems: 1 - items: - type: object - properties: - facilityId: - type: string - description: Programme specific facility identifier - facilityTitle: - type: string - description: Programme specific facility name - programAffiliation: - type: string - description: Programme/network affiliation - $comment: https://codes.wmo.int/wmdr/ProgramAffiliation - reportingStatus: - type: string - description: Station/Platform operating status - $comment: https://codes.wmo.int/wmdr/ReportingStatus - dates: - $ref: 'temporal.yaml#/dates' - deployments: + observations: type: array - description: facility deployments (placement / location of specific equipment) + description: "observations made at the facility, including the observed geometry and observed property" minItems: 1 items: - $ref: 'deployment.yaml' - instruments: - type: array - description: facility instruments - minItems: 1 - items: - $ref: 'instrument.yaml' + $ref: 'observations.yaml' required: - - contacts - - created + - type - title - - deployments - - instruments - + - created + - contacts + - observations links: type: array minItems: 1 diff --git a/standard/abstract_tests/ATS_class_core.adoc b/standard/abstract_tests/ATS_class_core.adoc index de30171..e516132 100644 --- a/standard/abstract_tests/ATS_class_core.adoc +++ b/standard/abstract_tests/ATS_class_core.adoc @@ -3,7 +3,7 @@ [%metadata] label:: http://wigos.wmo.int/spec/wmdr/2/conf/core subject:: Requirements Class "core" -classification:: Target Type:Station Metadata +classification:: Target Type:Observing facility metadata ==== ==== Validation @@ -29,7 +29,3 @@ include::./core/ATS_test_contacts.adoc[] ==== Record Creation Date include::./core/ATS_test_record_creation_date.adoc[] - -==== WMO Data Policy - -include::./core/ATS_test_data_policy.adoc[] diff --git a/standard/abstract_tests/core/ATS_test_data_policy.adoc b/standard/abstract_tests/core/ATS_test_data_policy.adoc deleted file mode 100644 index 85ba47d..0000000 --- a/standard/abstract_tests/core/ATS_test_data_policy.adoc +++ /dev/null @@ -1,37 +0,0 @@ -[[ats_core_data_policy]] -==== -[%metadata] -label:: /conf/core/data_policy -subject:: /req/core/data_policy -test-purpose:: Validate that a WMDR provides information about data policy and, if applicable additional information about licensing and/or copyright. - -[.component,class=test method] -===== -[.component,class=step] --- -Check for the type of WMDR (`+properties.type+`). --- -[.component,class=step] --- -If `+properties.type+` is found, and `+properties.type+` is equal to `+dataset+` check that `+properties.wmo:dataPolicy+` exists. --- - -===== - -[.component,class=test method] -===== -[.component,class=step] --- -Check for the existence of a `+properties.wmo:dataPolicy+` property in the WMDR. --- -[.component,class=step] --- -If `+properties.wmo:dataPolicy+` is found, check that `+properties.wmo:dataPolicy+` has a value equal to `+core+` or `+recommended+`. --- -[.component,class=step] --- -If `+properties.wmo:dataPolicy+` is equal to `+recommended+`, check for the existence of at least one `+links+` item containing a `+license+` link relation (`+rel+`). --- -===== - -==== diff --git a/standard/index.adoc b/standard/index.adoc index 5db72df..33895f7 100644 --- a/standard/index.adoc +++ b/standard/index.adoc @@ -53,7 +53,7 @@ include::sections/clause_6_informative_text.adoc[] include::sections/clause_7_normative_text.adoc[] -include::sections/clause_8_gsc.adoc[] +include::sections/clause_8_gofc.adoc[] include::sections/annex_a_ats.adoc[] diff --git a/standard/recommendations/core/PER_data_policy.adoc b/standard/recommendations/core/PER_data_policy.adoc deleted file mode 100644 index 1b8a769..0000000 --- a/standard/recommendations/core/PER_data_policy.adoc +++ /dev/null @@ -1,9 +0,0 @@ -[[per_core_data_policy]] -[width="90%",cols="2,6a"] -|=== -^|*Permission {counter:per-id}* |*/per/core/data_policy* -^|A|For core data (when `+properties.wmo:dataPolicy+` property is `+core+`), attribution licensing MAY be provided as needed. -^|B|For core data (when `+properties.wmo:dataPolicy+` is `+core+`) or recommended data (when `+properties.wmo:dataPolicy+` is `+recommended+`, and the data is compatible with free and unrestricted principles), a license or public domain statement that is compatible with free and unrestricted principles (such as link:https://creativecommons.org/publicdomain/zero/1.0/[Creative Commons CC0]) MAY be expressed as a link object with the `license` link relation. -^|C|For core data (when `+properties.wmo:dataPolicy+` is `+core+`) or recommended data (when `+properties.wmo:dataPolicy+` is `+recommended+`), a copyright statement MAY be expressed in `+properties.rights+`. -^|D|For core data (when `+properties.wmo:dataPolicy+` is `+core+`) or recommended data (when `+properties.wmo:dataPolicy+` is `+recommended+`), a link object MAY be expressed with `+rel=copyright+`. -|=== diff --git a/standard/recommendations/core/REC_data_policy.adoc b/standard/recommendations/core/REC_data_policy.adoc deleted file mode 100644 index 0d005f9..0000000 --- a/standard/recommendations/core/REC_data_policy.adoc +++ /dev/null @@ -1,11 +0,0 @@ -[[rec_core_data_policy_conditions]] -[width="90%",cols="2,6a"] -|=== -^|*Recommendation {counter:rec-id}* |*/rec/core/data_policy_conditions* -^|A|Additional conditions represented by a `+links+` item SHOULD also provide a `title` property to include human-readable information about the link. -^|B|To express any conditions on use of a given dataset, the `+properties.rights+` property SHOULD be used. -^|C|For core data or recommended data compatible with free and unrestricted principles, `+properties.rights+` SHOULD be declared with exactly the following statement: - - Users are granted free and unrestricted access to this data, without charge and with no conditions on use. Users are requested to attribute the producer of this data. WMO Unified Data Policy (Resolution 1 (Cg-Ext 2021)). -^|D|For core or recommended data not in the public domain, a copyright statement SHOULD be expressed as either a `+properties.rights+` statement or a link object with `+rel=copyright+`. -|=== diff --git a/standard/recommendations/core/REC_extent_temporal.adoc b/standard/recommendations/core/REC_extent_temporal.adoc new file mode 100644 index 0000000..0206490 --- /dev/null +++ b/standard/recommendations/core/REC_extent_temporal.adoc @@ -0,0 +1,6 @@ +[[rec_core_extent_temporal]] +[width="90%",cols="2,6a"] +|=== +^|*Recommendation {counter:rec-id}* |*/rec/core/extent_temporal* +^|A |For datasets with known or discrete intervals, a WMDR record SHOULD provide the temporal resolution (`+time.resolution+`) as a valid ISO 8601 duration (for example, `+P1D+`). +|=== diff --git a/standard/requirements/core/REQ_data_policy.adoc b/standard/requirements/core/REQ_data_policy.adoc deleted file mode 100644 index 7ed16be..0000000 --- a/standard/requirements/core/REQ_data_policy.adoc +++ /dev/null @@ -1,7 +0,0 @@ -[[req_core_data_policy]] -[width="90%",cols="2,6a"] -|=== -^|*Requirement {counter:req-id}* |*/req/core/data_policy* -^|A |The `+properties.wmo:dataPolicy+` property SHALL be `+core+` or `+recommended+`. -^|B |When the `+properties.wmo:dataPolicy+` property is `+recommended+`, data licensing SHALL be provided by at least one `+links+` item with link relations (`+rel+`) of `+license+`. -|=== diff --git a/standard/requirements/core/REQ_extent_temporal.adoc b/standard/requirements/core/REQ_extent_temporal.adoc new file mode 100644 index 0000000..022e786 --- /dev/null +++ b/standard/requirements/core/REQ_extent_temporal.adoc @@ -0,0 +1,8 @@ +[[req_core_extent_temporal]] +[width="90%",cols="2,6a"] +|=== +^|*Requirement {counter:req-id}* |*/req/core/extent_temporal* +^|A |A WMDR record SHALL provide one `+time+` property using the Gregorian calendar. +^|B |The `+time+` property SHALL provide either one `+date+`, `+timestamp+`, `+interval+`, or the value of `+null+` when a conformant time cannot be derived. +^|C |All non-null `+time+` values SHALL be valid ISO8601 representations or `+..+` for an open-ended extent. +|=== diff --git a/standard/requirements/requirements_class_core.adoc b/standard/requirements/requirements_class_core.adoc index bdd0f60..7578a9f 100644 --- a/standard/requirements/requirements_class_core.adoc +++ b/standard/requirements/requirements_class_core.adoc @@ -2,7 +2,7 @@ [cols="1,4",width="90%"] |=== |URI |http://wigos.wmo.int/spec/wmdr/2/req/core -|Target type|Station metadata +|Target type|Observing facility metadata |Dependency | The JavaScript Object Notation (JSON) Data Interchange Format link:https://datatracker.ietf.org/doc/html/rfc8259[(IETF RFC8259 (2017))] |Dependency |link:https://json-schema.org[JSON Schema] (2022) |Dependency |The GeoJSON Format link:https://datatracker.ietf.org/doc/html/rfc7946[(IETF: RFC-7946 (2016))] diff --git a/standard/sections/clause_0_front_material.adoc b/standard/sections/clause_0_front_material.adoc index 34ab781..aefbea3 100644 --- a/standard/sections/clause_0_front_material.adoc +++ b/standard/sections/clause_0_front_material.adoc @@ -14,7 +14,7 @@ Weather/climate/water data is by nature geospatial and temporal. The W3C Data o The following are keywords to be used by search engines and document catalogues. -wmo, wigos, station, instrument, weather, climate, water, metadata, search +wmo, wigos, station, observing facility, observations, instrument, weather, climate, water, metadata, search [big]*iii. Security Considerations* diff --git a/standard/sections/clause_1_scope.adoc b/standard/sections/clause_1_scope.adoc index 8d80bac..d518612 100644 --- a/standard/sections/clause_1_scope.adoc +++ b/standard/sections/clause_1_scope.adoc @@ -1,14 +1,14 @@ == Scope This document defines the content, structure, and encoding of discovery metadata published -as part of the WIGOS Global Station Catalogue (GSC). +as part of the WIGOS Global Observing Facility Catalogue (GOFC). The WIGOS Metadata Representation (WMDR) standard defined herein is an extension of the International Standard _OGC API - Records - Part 1: Core_. -WMDR station metadata records shall be encoded as GeoJSON as defined in _OGC API - Records - Part 1: Core_. +WMDR observing facility metadata records shall be encoded as GeoJSON as defined in _OGC API - Records - Part 1: Core_. The primary purpose of WMDR is to describe **stations**, or observing facilities. Services and APIs operating on resources are represented as part of discovery metadata via links to WIS2 discovery metadata (WCMP2). -WMDR station metadata record provides descriptions at the granularity level of a station, or observing facilty. Dataset discovery metadata are supported by the _Manual on the WMO Information System, Volume II - WMO Information System 2.0_ footnote:[https://library.wmo.int/idurl/4/68731]. +WMDR observing facility metadata record provides descriptions at the granularity level of a station, or observing facilty. Dataset discovery metadata are supported by the _Manual on the WMO Information System, Volume II - WMO Information System 2.0_ footnote:[https://library.wmo.int/idurl/4/68731]. This specification defines the conformance requirements for the WIGOS Metadata Representation. Annex A defines the abstract test suite. Annex B provides normative information on schemas. Annex C provides informative examples. Annex D provides informative codelists. diff --git a/standard/sections/clause_2_conformance.adoc b/standard/sections/clause_2_conformance.adoc index ac5be68..c3530e0 100644 --- a/standard/sections/clause_2_conformance.adoc +++ b/standard/sections/clause_2_conformance.adoc @@ -4,9 +4,9 @@ Conformance with this standard shall be checked using the tests specified in Ann _OGC API - Records_ (OARec) provides a record metadata model in support of resource discovery. This standard is an extension of _OGC API - Records - Part 1: Core_. Conformance to this standard requires demonstrated conformance to the applicable Conformance Classes of _OGC API - Records - Part 1: Core_. -Authors of station metadata records published within the WIGOS Global Station Catalogue (GSC) are required to comply with the WIGOS Metadata Representation (WMDR). WMDR station metadata shall therefore be compliant with OGC API - Records - Part 1: Core: Requirements Class: Record Core. +Authors of observing facility metadata records published within the WIGOS Global Observing Facility Catalogue (GOFC) are required to comply with the WIGOS Metadata Representation (WMDR). WMDR observing facility metadata shall therefore be compliant with OGC API - Records - Part 1: Core: Requirements Class: Record Core. -WMO shall publish guidance material to assist authors of WMDR station metadata for maintaining +WMO shall publish guidance material to assist authors of WMDR observing facility metadata for maintaining consistency across multiple metadata records and perform quality assessment and reporting. This standard identifies one Requirements Class which defines the functional requirements. diff --git a/standard/sections/clause_4_terms_and_definitions.adoc b/standard/sections/clause_4_terms_and_definitions.adoc index 45d1f17..276b0a4 100644 --- a/standard/sections/clause_4_terms_and_definitions.adoc +++ b/standard/sections/clause_4_terms_and_definitions.adoc @@ -36,8 +36,8 @@ The following additional terms and definitions also apply. |GISC |Global Information System Centre -|GSC -|Global Station Catalogue +|GOFC +|Global Observing Facility Catalogue |HTML |Hypertext Markup Language diff --git a/standard/sections/clause_6_informative_text.adoc b/standard/sections/clause_6_informative_text.adoc index bdde5a3..fc61d89 100644 --- a/standard/sections/clause_6_informative_text.adoc +++ b/standard/sections/clause_6_informative_text.adoc @@ -8,14 +8,14 @@ TODO TODO -==== Station metadata design considerations +==== Observing facility metadata design considerations -The following describes envisioned workflows of WMDR in the context of station metadata publication and search. +The following describes envisioned workflows of WMDR in the context of observing facility metadata publication and search. -* Flexible metadata publishing mechanisms so providers can publish station metadata in the easiest and most efficient way possible. -* Basic, HTTP crawlable metadata files (filesystem, object storage). For example, publishing station metadata as JSON files to an S3 bucket, and then making that bucket available for harvesting and traversal to search engines and metadata harvesters. +* Flexible metadata publishing mechanisms so providers can publish observing facility metadata in the easiest and most efficient way possible. +* Basic, HTTP crawlable metadata files (filesystem, object storage). For example, publishing observing facility metadata as JSON files to an S3 bucket, and then making that bucket available for harvesting and traversal to search engines and metadata harvesters. * The browser as the catalogue. Browsers utilize mass market search engines as the gateway to low barrier -discovery. This pattern may work by way of the WIGOS Global Station Catalogue, with the idea that search engines can index from the authoritative source. +discovery. This pattern may work by way of the WIGOS Global Observing Facility Catalogue, with the idea that search engines can index from the authoritative source. ==== Granularity @@ -35,20 +35,20 @@ The OGC Records - API - Part 1: Core specification: * provides a subset of core queryables (e.g. by resource type, by external identifier) which enables federation and cross catalogue discovery functionality -=== The WIGOS Global Station Catalogue (GSC) +=== The WIGOS Global Observing Facility Catalogue (GOFC) -The GSC will provide a central search endpoint, enabling users to traverse, browse and search -station metadata holdings in OSCAR. Key search predicate capabilities include: +The GOFC will provide a central search endpoint, enabling users to traverse, browse and search +observing facility metadata holdings in OSCAR. Key search predicate capabilities include: * geospatial (`+bbox=+`) * temporal (time instant or time period) (`+datetime=+`) * equality predicates (i.e. `+property=value+`) for any defined discovery metadata property * full-text (`+q=+`) -Given the WIS2 principles, use cases, OGC API - Records - Part 1: Core, and the WIGOS Global Station Catalogue, WMDR provides a standards-based, clear and well-defined information model to facilitate the management and discovery of data within WIGOS. +Given the WIS2 principles, use cases, OGC API - Records - Part 1: Core, and the WIGOS Global Observing Facility Catalogue, WMDR provides a standards-based, clear and well-defined information model to facilitate the management and discovery of data within WIGOS. === Mass market considerations Given WIS2 principle 10 (publishing metadata in a way that commercial search engines can index), -WMDR station metadata enables annotations that can facilitate Search Engine Optimization (SEO) and +WMDR observing facility metadata enables annotations that can facilitate Search Engine Optimization (SEO) and structured data discovery, search, and relevant results. diff --git a/standard/sections/clause_7_normative_text.adoc b/standard/sections/clause_7_normative_text.adoc index 5a2a81f..819cc66 100644 --- a/standard/sections/clause_7_normative_text.adoc +++ b/standard/sections/clause_7_normative_text.adoc @@ -31,6 +31,10 @@ The table below provides an overview of the set of properties that may be includ |**Required** |Geospatial location associated with the dataset, in a geographic coordinate reference system (see TODO) +|``properties.type`` +|**Required** +|Record type (fixed to ``facility``) + |``properties.externalIds`` |Optional |Persistent identifiers or handles for the dataset (see TODO) @@ -64,7 +68,7 @@ include::../requirements/core/REQ_validation.adoc[] ==== Identifier The `+id+` property is a unique identifier -of the dataset. A record identifier is essential for querying and identifying records within the Global Discovery Catalogue (GDC). +of the dataset. A record identifier is essential for querying and identifying records within the Global Observing Facility Catalogue (GOFC). .Example @@ -93,7 +97,7 @@ include::../requirements/core/REQ_conformance.adoc[] ==== Geospatial extent -The `+geometry+` property is the location of the station/platform in the geographic coordinate system. , and provides a useful indicator of the location of the station/platform to facilitate search and map displays in the GSC. +The `+geometry+` property is the location of the station/platform in the geographic coordinate system. , and provides a useful indicator of the location of the station/platform to facilitate search and map displays in the GOFC. .Examples: @@ -129,6 +133,71 @@ include::../recommendations/core/REC_extent_geospatial_point.adoc[] include::../recommendations/core/REC_extent_geospatial_precision.adoc[] include::../recommendations/core/PER_extent_geospatial.adoc[] +===== Temporal extent + +The `+time+` property describes the aggregate extent of the facility. + +Temporal extents provide a useful indicator of the date and time period of the facility and facilitate temporal searching in the GOFC. + +.Examples: + +[source,json] +---- +"time": { + "date": "2021-10-30" +} +---- + +[source,json] +---- +"time": { + "timestamp": "2021-10-30T11:11:11Z" +} +---- + +[source,json] +---- +"time": { + "interval" : ["2020-10-30", "2021-10-30"], + "resolution": "P1D" +} +---- + +[source,json] +---- +"time": { + "interval" : ["T00Z", "T23Z"], + "resolution": "PT1H" +} +---- + +[source,json] +---- +"time": { + "interval": ["2018-04-22", ".."], +} +---- + +[source,json] +---- +"time": null +---- + +include::../requirements/core/REQ_extent_temporal.adoc[] +include::../recommendations/core/REC_extent_temporal.adoc[] + +==== Properties / Type + +TODO + +==== Properties / Title + +TODO + +==== Properties / Description + +TODO + ==== Properties / Contacts The `+contacts+` property is the information associated with one or more parties responsible for the resource. @@ -269,82 +338,39 @@ The `+created+` property is a single date, being the date that the WMDR was crea include::../recommendations/core/REC_record_update_date.adoc[] -==== Properties / WMO data policy +==== Properties / Additional identifiers -The `+wmo:dataPolicy+` property is a codelist that identifies the classification of the dataset exchange as described by the WMO Unified Data Policy (Resolution 1 (Cg-Ext(2021)))footnote:[Resolution 1 (Cg-Ext(2021)) – WMO Unified Policy for the International Exchange of Earth System Data (World Meteorological Congress: Abridged Final Report of the Extraordinary Session (WMO-No. 1281))] for the international exchange of Earth system data. The code list values are `+core+` or `+recommended+`. The `+wmo:dataPolicy+` property is required if the metadata record describes a dataset. +TODO -Licensing and copyright are expressed via the `+links+` property (see TODO), providing access, license and attribution details as required. Conditions on use of the data should be indicated for transparency and clarification. +==== Properties / Additional titles -.Example: Core data +TODO -[source,json] ----- -"properties": { - ... - "wmo:dataPolicy": "core" - ... -} ----- -.Example: Recommended data -[source,json] ----- -"properties": { - ... - "wmo:dataPolicy": "recommended" - ... -} ----- +==== Properties / Facility type -It is useful to add provider-specific details to have the most detailed information about data policy and additional conditions. +TODO -.Example: Recommended data with additional conditions and provider-specific details -[source,json] ----- -"properties": { - ... - "wmo:dataPolicy": "recommended" - ... -}, -"links": [{ - "rel": "license", - "href": "https://example.org/license", - "type": "text/html", - "title": "EUMETSAT DATA LICENSING" -}] ----- +==== Properties / WMO region -.Example: License for recommended data in the public domain -[source,json] ----- -"properties": { - ... - "wmo:dataPolicy": "recommended" - ... -}, -"links": [{ - "rel": "license", - "href": "https://creativecommons.org/publicdomain/zero/1.0/", - "type": "text/html", - "title": "CC0 1.0 Deed | CC0 1.0 Universal | Creative Commons" -}] ----- +TODO -To express rights not addressed by a license, the `+rights+` property can be used as follows: +==== Properties / Territories -.Example: Rights -[source,json] ----- -"properties": { - ... - "rights": "Users are granted free and unrestricted access to this data, without charge and with no conditions on use. Users are requested to attribute the producer of this data. WMO Unified Data Policy (Resolution 1 (Cg-Ext 2021))." - ... -} ----- +TODO + + +==== Properties / Observations + +TODO -include::../requirements/core/REQ_data_policy.adoc[] -include::../recommendations/core/REC_data_policy.adoc[] -include::../recommendations/core/PER_data_policy.adoc[] +==== Properties / Observations / Configurations + +TODO + +==== Properties / Observations / Configurations / Instrument + +TODO ==== Links and distribution information @@ -378,7 +404,7 @@ record. Additional properties do not render a record non-compliant with WMDR. include::../recommendations/core/PER_additional_properties.adoc[] -=== WMO Core Metadata Profile resources +=== WIGOS Metadata Representation resources ==== WMO Codes Registry diff --git a/standard/sections/clause_8_gofc.adoc b/standard/sections/clause_8_gofc.adoc new file mode 100644 index 0000000..99dd979 --- /dev/null +++ b/standard/sections/clause_8_gofc.adoc @@ -0,0 +1,10 @@ +:sectnums: +== Cataloguing considerations + +In addition to documenting and describing WIGOS metadata holdings, WMDR observing facility metadata will be searchable via the WIGOS Global Observing Facility Catalogue (GOFC). As part of discovery and search workflow, a GOFC may choose to apply filters to help narrow search results. This is realized by the API of the GOFC, as well as applying facets in the catalogue. + +=== Faceting + +The API of the GOFC, in addition to allowing for spatial/temporal/attribute queries and filters, +may choose to apply facets to WMDRs. Facets are effective when applied against controlled +vocabularies and classifications. diff --git a/standard/sections/clause_8_gsc.adoc b/standard/sections/clause_8_gsc.adoc deleted file mode 100644 index e8dace5..0000000 --- a/standard/sections/clause_8_gsc.adoc +++ /dev/null @@ -1,13 +0,0 @@ -:sectnums: -== Cataloguing considerations - -In addition to documenting and describing WIGOS metadata holdings, WMDR station metadata will be -searchable via the WIGOS Global Station Catalogue (GSC). As part of discovery and search -workflow, a GSC may choose to apply filters to help narrow search results. This is realized by -the API of the GSC, as well as applying facets in the catalogue. - -=== Faceting - -The API of the GSC, in addition to allowing for spatial/temporal/attribute queries and filters, -may choose to apply facets to WMDRs. Facets are effective when applied against controlled -vocabularies and classifications.