Skip to content

Commit 1ac690a

Browse files
committed
Align Met Office results with OSH schema
1 parent 1d8f864 commit 1ac690a

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

publishers/met_office_datahub/bootstrap_met_office_datahub.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ def _datastream_schema(station: dict, parameter: dict) -> dict:
246246
"label": f"Met Office {parameter['label']} Observation",
247247
"description": "Met Office Land Observations reading with source metadata.",
248248
"fields": [
249-
{"type": "Time", "name": "timestamp", "label": "Observation Time", "definition": "http://www.opengis.net/def/property/OGC/0/SamplingTime", "referenceTime": "1970-01-01T00:00:00Z", "uom": {"code": "s"}},
250249
{"type": "Text", "name": "locationId", "label": "Curated Location ID", "definition": "http://sensorml.com/ont/swe/property/StationID"},
251250
{"type": "Text", "name": "geohash", "label": "Met Office Geohash", "definition": "http://sensorml.com/ont/swe/property/Identifier"},
252251
{"type": "Text", "name": "parameter", "label": "Parameter", "definition": "http://sensorml.com/ont/swe/property/ObservableProperty"},

publishers/met_office_datahub/met_office_datahub_publisher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ def _latest_for_station(self, station: dict) -> list[dict]:
513513
record, phenomenon_time, value = selected
514514
timestamp, _ = _parse_source_time(phenomenon_time)
515515
result = {
516-
"timestamp": timestamp,
517516
"locationId": station["id"],
518517
"geohash": location["geohash"],
519518
"parameter": parameter["label"],
@@ -525,6 +524,7 @@ def _latest_for_station(self, station: dict) -> list[dict]:
525524
"station": station,
526525
"parameter": parameter,
527526
"phenomenonTime": phenomenon_time,
527+
"timestamp": timestamp,
528528
"value": value,
529529
"result": result,
530530
"dedupeKey": f"{station['id']}|{parameter['outputName']}|{phenomenon_time}|{value}",

0 commit comments

Comments
 (0)