Skip to content

Web Map Service (WMS)

Federal offices make part of their data available via the WMS - Federal Spatial Data Infrastructure (FSDI) service. The data layers currently available in the WMS-FSDI correspond, with a few exceptions, to the geodata that are presented in map.geo.admin.ch.

GetCapabilities

The GetCapabilities document provides information about the service, along with layer description, both in German and French.

https://wms.geo.admin.ch/?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&LANG=<Lang>
ParameterDescription
Lang (optional)The language. Supported values: de, fr (Defaults to de)

Supported Projections

  • EPSG:2056 CH1903+ / LV95 -- Swiss CH1903+ / LV95
  • EPSG:21781 CH1903 / LV03 -- Swiss CH1903 / LV03
  • EPSG:4326 WGS 84 -- WGS84 - World Geodetic System 1984 (GPS)
  • EPSG:3857 WGS 84 / Pseudo-Mercator -- Spherical Mercator, Google Maps, OpenStreetMap, Bing, ArcGIS, ESRI
  • EPSG:3034 ETRS89-extended / LCC Europe
  • EPSG:3035 ETRS89-extended / LAEA Europe
  • EPSG:4258 ETRS89
  • EPSG:31287 MGI / Austria Lambert
  • EPSG:25832 ETRS89 / UTM zone 32N
  • EPSG:25833 ETRS89 / UTM zone 33N
  • EPSG:31467 DHDN / 3-degree Gauss-Kruger zone 3
  • EPSG:32632 WGS 84 / UTM zone 32N
  • EPSG:32633 WGS 84 / UTM zone 33N
  • EPSG:900913 Google Maps Global Mercator -- Spherical Mercator (unofficial - used in open source projects / OSGEO)

GetMap

https://wms.geo.admin.ch/?SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&LAYERS=<Layers>&STYLES=<Styles>&CRS=<CRS>&BBOX=<BBOX>&WIDTH=<Width>&HEIGHT=<Height>&FORMAT=<Format>

Use the following parameters to define your request:

ParameterExampleDescription
Layersch.bafu.bundesinventare-blnComma-separated list of layer names to display.
StylesdefaultComma-separated list of styles. Use default if unsure.
CRSEPSG:2056Coordinate Reference System. Supported values: see Supported Projections.
BBOX2550000,1060000,2660000,1140000Bounding box of the map image (minX,minY,maxX,maxY) in the selected CRS.
Width800Width of the output image in pixels.
Height582Height of the output image in pixels.
Formatimage/pngOutput image format (e.g., image/png, image/jpeg).

Example of a GetMap request:

bash
curl -o demo.png "https://wms.geo.admin.ch/?\
SERVICE=WMS&REQUEST=GetMap&\
VERSION=1.3.0&\
LAYERS=ch.bafu.bundesinventare-bln&\
STYLES=default&\
CRS=EPSG:2056&\
BBOX=2550000,1060000,2660000,1140000&\
WIDTH=800&\
HEIGHT=582&\
FORMAT=image/png"

The output image:

GetFeatureInfo

https://wms.geo.admin.ch/?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&LAYERS=<Layers>&QUERY_LAYERS=<QueryLayers>&STYLES=<Styles>&CRS=<CRS>&BBOX=<BBOX>&WIDTH=<Width>&HEIGHT=<Height>&I=<I>&J=<J>&INFO_FORMAT=<InfoFormat>&FEATURE_COUNT=<FeatureCount>&LANG=<Lang>&FORMAT=<Format>&TRANSPARENT=<Transparent>

Use the following parameters to define your request:

ParameterExampleDescription
Layersch.bafu.bundesinventare-blnComma-separated list of layer names to display.
QueryLayersch.bafu.bundesinventare-blnComma-separated list of layers to query for information.
StylesComma-separated list of styles. Use default or leave empty if unsure.
CRSEPSG:2056Coordinate Reference System. Supported values: see Supported Projections.
BBOX2609000,1123050,2614050,1128100Bounding box of the map image (minX,minY,maxX,maxY) in the selected CRS.
Width101Width of the output image in pixels.
Height101Height of the output image in pixels.
I50X coordinate (pixel column) of the point to query, starting from 0 (left).
J50Y coordinate (pixel row) of the point to query, starting from 0 (top).
InfoFormattext/plainFormat of the returned feature info (e.g., text/plain, application/json).
FeatureCount10Maximum number of features to return.
LangenLanguage for the response. Supported values: de, fr, it, en.
Formatimage/pngOutput image format (should match the map request).
TransparenttrueWhether the background should be transparent (true or false).

Example of a GetFeatureInfo request:

Request
Response
sh
curl https://wms.geo.admin.ch/?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&FORMAT=image%2Fpng&TRANSPARENT=true&QUERY_LAYERS=ch.bafu.bundesinventare-bln&LAYERS=ch.bafu.bundesinventare-bln&FEATURE_COUNT=10&INFO_FORMAT=text%2Fplain&LANG=en&I=50&J=50&CRS=EPSG%3A2056&STYLES=&WIDTH=101&HEIGHT=101&BBOX=2609000%2C1123050%2C2614050%2C1128100

GetLegendGraphic

https://wms.geo.admin.ch/?SERVICE=WMS&REQUEST=GetLegendGraphic&VERSION=1.3.0&LAYERS={Layers}&STYLES={Styles}&LANG={Lang}&CRS={CRS}&BBOX={BBOX}&WIDTH={Width}&HEIGHT={Height}&FORMAT={Format}

Use the following parameters to define your request:

ParameterExampleDescription
Layersch.bafu.bundesinventare-blnComma-separated list of layer names for which to request the legend.
StylesdefaultComma-separated list of styles. Use default if unsure.
LangenLanguage for the legend. Supported values: de, fr, it, en.
CRSEPSG:2056Coordinate Reference System. Supported values: see Supported Projections
BBOX2550000,1060000,2660000,1140000Bounding box of the map image (minX,minY,maxX,maxY) in the selected CRS.
Width800Width of the output image in pixels.
Height582Height of the output image in pixels.
Formatimage/pngOutput image format (e.g., image/png, image/jpeg).

Example of a GetLegendGraphic request:

bash
curl -o demo.png https://wms.geo.admin.ch/?SERVICE=WMS&REQUEST=GetLegendGraphic&VERSION=1.3.0&LAYERS=ch.bafu.bundesinventare-bln&STYLES=default&LANG=en&CRS=EPSG:2056&BBOX=2550000,1060000,2660000,1140000&WIDTH=800&HEIGHT=582&FORMAT=image/png

The output image:

Further information

Example: OpenLayers

This OpenLayers example shows how the CadastralWebMap appears differently when loaded using a WMTS compared to a tiled WMS.