Skip to content

Commit 4f9dc94

Browse files
committed
Use real imagery for Met Office Global Spot
1 parent 64ff3a1 commit 4f9dc94

1 file changed

Lines changed: 26 additions & 15 deletions

File tree

publishers/met_office_global_spot/bootstrap_met_office_global_spot.py

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,9 @@
3434
GLOBAL_SPOT_BASE_URL = "https://data.hub.api.metoffice.gov.uk/sitespecific/v0"
3535
GLOBAL_SPOT_DEFAULT_HOURLY_PATH = "/point/hourly"
3636
PUBLISH_INTERVAL_SECONDS = 3600
37-
GLOBAL_SPOT_THUMBNAIL_DATA_URI = (
38-
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 200'%3E"
39-
"%3Crect width='320' height='200' fill='%23082f49'/%3E"
40-
"%3Cpath d='M0 138 C44 112 82 160 128 132 S210 92 320 126 L320 200 L0 200 Z' fill='%230f766e'/%3E"
41-
"%3Cpath d='M0 158 C58 128 104 178 166 144 S258 118 320 146' fill='none' stroke='%235eead4' stroke-width='3' opacity='.75'/%3E"
42-
"%3Ccircle cx='238' cy='58' r='26' fill='%23fef3c7'/%3E"
43-
"%3Cpath d='M70 66 h86 a26 26 0 0 0 -44 -18 a35 35 0 0 0 -66 11 a22 22 0 0 0 24 7z' fill='%23e0f2fe'/%3E"
44-
"%3Cpath d='M68 96 h178' stroke='%2393c5fd' stroke-width='4' stroke-linecap='round' stroke-dasharray='12 9'/%3E"
45-
"%3Ctext x='160' y='178' text-anchor='middle' font-family='Arial,sans-serif' font-size='19' font-weight='700' fill='%23f8fafc'%3EGlobal Spot Forecast%3C/text%3E"
46-
"%3C/svg%3E"
47-
)
37+
MET_OFFICE_WEATHER_STATION_IMAGE = "https://upload.wikimedia.org/wikipedia/commons/3/3b/Met_Office_Weather_Station_at_Lusa_-_geograph.org.uk_-_808151.jpg"
38+
MET_OFFICE_WEATHER_STATION_SOURCE = "https://commons.wikimedia.org/wiki/File:Met_Office_Weather_Station_at_Lusa_-_geograph.org.uk_-_808151.jpg"
39+
MET_OFFICE_WEATHER_STATION_LICENSE = "https://creativecommons.org/licenses/by-sa/2.0/"
4840

4941

5042
def _load_config() -> dict:
@@ -154,6 +146,10 @@ def _system_stub(location: dict) -> dict:
154146
"featureType": "sosa:System",
155147
"name": f"Met Office Global Spot Forecast {location['name']}",
156148
"description": location["description"],
149+
"image": {
150+
"href": MET_OFFICE_WEATHER_STATION_IMAGE,
151+
"title": "Representative Met Office weather station photograph",
152+
},
157153
"validTime": [VALID_TIME_START, ".."],
158154
},
159155
}
@@ -191,12 +187,27 @@ def _system_sml(location: dict) -> dict:
191187
{"role": "http://dbpedia.org/resource/Web_page", "name": "Weather DataHub Glossary", "link": {"href": MET_OFFICE_GLOSSARY, "type": "text/html"}},
192188
{
193189
"role": "http://dbpedia.org/resource/Photograph",
194-
"name": "Representative Global Spot Forecast Thumbnail",
190+
"name": "Representative Met Office Weather Station Photograph",
195191
"description": (
196-
"Original OS4CSAPI SVG thumbnail for a Met Office Global Spot virtual forecast point. "
197-
"This represents forecast data, not a physical deployed sensor."
192+
"Photograph of a real Met Office weather station used as the representative source image "
193+
"for Met Office Global Spot virtual forecast points. These resources are configured forecast "
194+
"locations rather than physical deployed sensors, so this image represents the meteorological "
195+
"observing infrastructure behind the forecast service. Photo: Dave Fergusson, CC BY-SA 2.0, "
196+
"via Wikimedia Commons / Geograph Britain and Ireland."
198197
),
199-
"link": {"href": GLOBAL_SPOT_THUMBNAIL_DATA_URI, "type": "image/svg+xml"},
198+
"link": {"href": MET_OFFICE_WEATHER_STATION_IMAGE, "type": "image/jpeg"},
199+
},
200+
{
201+
"role": "http://dbpedia.org/resource/Web_page",
202+
"name": "Representative Met Office Weather Station Photo Source",
203+
"description": "Wikimedia Commons source page for the Met Office weather station photograph.",
204+
"link": {"href": MET_OFFICE_WEATHER_STATION_SOURCE, "type": "text/html"},
205+
},
206+
{
207+
"role": "http://dbpedia.org/resource/Web_page",
208+
"name": "Representative Met Office Weather Station Photo License",
209+
"description": "Creative Commons Attribution-ShareAlike 2.0 license for the weather station photograph.",
210+
"link": {"href": MET_OFFICE_WEATHER_STATION_LICENSE, "type": "text/html"},
200211
},
201212
],
202213
"characteristics": [{"label": "Forecast Point Properties", "characteristics": [

0 commit comments

Comments
 (0)