The geospatial datasets of the Swiss Federal Office of Energy (SFOE) are available via the STAC API. The STAC API is a "dataset based" download service providing access to packaged geospatial data and related metadata. Here we show you some examples how to query the STAC-API:
- General information on the STAC-API
- Detailled documentation of the STAC-API
- STAC Specification
- Plugin to read data directly in QGIS using STAC-API
Note: Use GeoAdmin API if you want to query objects within a dataset.
You will find all available datasets of the Federal Spatial Data Infrastructure FSDI here.
Use the GET collections endpoint.
E.G Get the details of the dataset "Wind Energy Plants:
https://data.geo.admin.ch/api/stac/v0.9/collections/ch.bfe.windenergieanlagen
Use the GET features endpoint.
E.G Get the all downloads of the dataset "Wind Energy Plants:
https://data.geo.admin.ch/api/stac/v0.9/collections/ch.bfe.windenergieanlagen/items
Use the GET search endpoint.
E.G Get the all dataset acquired after 2022-02-01:
https://data.geo.admin.ch/api/stac/v0.9/search?datetime=2022-02-01/..
Time intervalls can be expressed as followed:
- A date-time: "2018-02-12T23:20:50Z"
- A closed interval: "2018-02-12T00:00:00Z/2018-03-18T12:31:12Z"
- Open intervals: "2018-02-12T00:00:00Z/.." or "../2018-03-18T12:31:12Z"