|
33 | 33 | GLOBAL_SPOT_API_CONTEXT = "/sitespecific/v0" |
34 | 34 | GLOBAL_SPOT_BASE_URL = "https://data.hub.api.metoffice.gov.uk/sitespecific/v0" |
35 | 35 | GLOBAL_SPOT_DEFAULT_HOURLY_PATH = "/point/hourly" |
| 36 | +GLOBAL_SPOT_THUMBNAIL_DATA_URI = ( |
| 37 | + "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 200'%3E" |
| 38 | + "%3Crect width='320' height='200' fill='%23082f49'/%3E" |
| 39 | + "%3Cpath d='M0 138 C44 112 82 160 128 132 S210 92 320 126 L320 200 L0 200 Z' fill='%230f766e'/%3E" |
| 40 | + "%3Cpath d='M0 158 C58 128 104 178 166 144 S258 118 320 146' fill='none' stroke='%235eead4' stroke-width='3' opacity='.75'/%3E" |
| 41 | + "%3Ccircle cx='238' cy='58' r='26' fill='%23fef3c7'/%3E" |
| 42 | + "%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" |
| 43 | + "%3Cpath d='M68 96 h178' stroke='%2393c5fd' stroke-width='4' stroke-linecap='round' stroke-dasharray='12 9'/%3E" |
| 44 | + "%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" |
| 45 | + "%3C/svg%3E" |
| 46 | +) |
36 | 47 |
|
37 | 48 |
|
38 | 49 | def _load_config() -> dict: |
@@ -177,6 +188,15 @@ def _system_sml(location: dict) -> dict: |
177 | 188 | {"role": "http://dbpedia.org/resource/Web_page", "name": "Site-Specific Forecast Overview", "link": {"href": SITE_SPECIFIC_OVERVIEW, "type": "text/html"}}, |
178 | 189 | {"role": "http://dbpedia.org/resource/Web_page", "name": "Forecast point query", "description": "Configured hourly Global Spot forecast query for this point. The exact endpoint path may be overridden at runtime.", "link": {"href": _forecast_url(location), "type": "application/json"}}, |
179 | 190 | {"role": "http://dbpedia.org/resource/Web_page", "name": "Weather DataHub Glossary", "link": {"href": MET_OFFICE_GLOSSARY, "type": "text/html"}}, |
| 191 | + { |
| 192 | + "role": "http://dbpedia.org/resource/Photograph", |
| 193 | + "name": "Representative Global Spot Forecast Thumbnail", |
| 194 | + "description": ( |
| 195 | + "Original OS4CSAPI SVG thumbnail for a Met Office Global Spot virtual forecast point. " |
| 196 | + "This represents forecast data, not a physical deployed sensor." |
| 197 | + ), |
| 198 | + "link": {"href": GLOBAL_SPOT_THUMBNAIL_DATA_URI, "type": "image/svg+xml"}, |
| 199 | + }, |
180 | 200 | ], |
181 | 201 | "characteristics": [{"label": "Forecast Point Properties", "characteristics": [ |
182 | 202 | {"type": "Text", "name": "curated_location_id", "label": "Curated Forecast Point ID", "value": location["id"]}, |
|
0 commit comments