Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Latest commit

 

History

History
102 lines (58 loc) · 3.46 KB

METEOSCHWEIZ.md

File metadata and controls

102 lines (58 loc) · 3.46 KB

METEOSCHWEIZ

In map.geo.admin.ch, GeoJSON layers consist in one data layer (geojson) and another style layer (json). The GeoJSON layer are hosted in an AWS S3 bucket (data.geo.admin.ch) and the style are embeded in mf-chsdi3 (https://api3.geo.admin.ch).

Meteoschweiz needs a way to edit and test new GeoJSON styles.

Background information

Most of the map.geo.admin.ch layers, topics and catalog configurations are hold in a few configuration files. Theses files are statified services in map.geo.admin.ch deployment to the int and prod environment, but real services on dev

The location of these files may be controlled by the parameter config_url.

See #4764 for discussions and implementation

Generating a custom configuration

In the mf-geoadmin3 directory:

make meteoconfigs/

or if integrating new layers, use the dev service

API_URL=https://mf-chsdi3.dev.bgdi.ch make meteoconfigs/

This will copy the standards files from configs/ into a directory meteoconfigs/ and modify the jsonStyleUrl of MeteoSchweiz's layers using the script scripts/meteoStyleUrl.py

The server hosting the style is defined by METEO_TESTING_STYLE_BASEURL and is currently cms.geo.admin.ch

Copy the content of the configs directory in a suitable directory accessible with a domain ending in bgdi.ch, swisstopo.cloud or geo.admin.ch. Or simply with

make s3uploadmeteoconfig

The custom meteoconfigs will be uploaded to an AWS S3 Bucket s3://mf-geoadmin3-dev-dublin/meteoconfigs and the files will be accessible with https://mf-geoadmin3.dev.bgdi.ch/meteoconfigs

Point your browser to:

https://map.geo.admin.ch?config_url=//mf-geoadmin3.dev.bgdi.ch/meteoconfigs

Style and resources for testing

Testing styles for GeoJson are to be on the location defined in the above mentionned meteoconfigs files, currently:

_https://cms.geo.admin.ch/ch.meteoschweiz/{bodLayerId}/testing/{bodLayerId}.json_

Custom resource for testing are to be hosted on

_https://cms.geo.admin.ch/ch.meteoschweiz/images/_

AWS S3 Buckets and URLS

GeoJson data (unchangend)

bucket s3://data.geo.admin.ch Url https://data.geo.admin.ch/ch.meteoschweiz.*

Config to custom meteoconfigs (new)

Use the param: config_url S3 bucket: s3://mf-geoadmin3-dev-dublin/meteoconfigs/ URL : https://mf-geoadmin3.dev.bgdi.ch/meteoconfigs/

Testing style (moved)

old s3://data.geo.admin.ch new s3://cms.geo.admin.ch/ch.meteoschweiz url: https://cms.geo.admin.ch/ch.meteoschweiz/

Image for testing (moved) old s3://data.geo.admin.ch/ch.meteoschweiz new s3://cms.geo.admin.ch/ch.meteoschweiz URL: https://cms.geo.admin.ch/ch.meteoschweiz

⚠️ For the integrators, you'll have to copy the images and json files back to data.geo.admin.ch, and update the path in the style json, if needed.

Testing

https://map.geo.admin.ch/?config_url=//mf-geoadmin3.dev.bgdi.ch/meteoconfigs/

or with a custom meteoschweiz layer:

https://map.geo.admin.ch/?config_url=%2F%2Fmf-geoadmin3.dev.bgdi.ch%2Fmeteoconfigs%2F&lang=fr&topic=meteoschweiz&bgLayer=voidLayer&layers=ch.bafu.gefahren-basiskarte,ch.meteoschweiz.messwerte-wind-boeenspitze-kmh-6h&layers_opacity=0.7,1&catalogNodes=15046,15055,15126,15138,15052

Verify that the Style file and the various images are hosted on https://cms.geo.admin.ch