Swisssearch geocoding allows the user to search for swiss locations, like postcode, cantons, cities, toponymic datase (SwissNames) and addresses.
Note: The swiss cantons only allow websites of the federal governement to use the addresses search service.
You may however use this service using the ‘no_geom’ parameter returning no geocoded addresses, to check for the existence of an address.
The following parameters are required:
The service returns a maximum of 20 results.
Services in use:
Examples:
Note: In French, search for “leopold robert”, not only for “robert”
A JSON content is sent back with the following content:
Swisssearch reverse geocoding allows the user to search for swiss locations, like postcode, cantons, cities and swissnames based on a coordinate.
The following parameters are required:
Note: The swiss cantons only allow websites of the federal governement to use the addresses search service.
The service returns a maximum of 50 results.
Examples:
Per default, a JSON content is sent back with the following content:
This service allows to search for a feature ID stored in the spatial data infrastructure.
The following parameters are required:
A GeoJSON representation of the found feature.
This service allows to search within the feature stored in the spatial data infrastructure.
The following parameters are required:
A GeoJSON representation of the found features.
This service allows to obtain the bbox of the searched features.
The following parameters are required:
A GeoJSON representation of the found features.
This service allows to obtain the geometry of the searched features.
The following parameters are required:
A GeoJSON representation of the found features.
This service allows to obtain diverse information about the layers in the bod.
https://api.geo.admin.ch/layers https://api.geo.admin.ch/layers/{id} or https://api.geo.admin.ch/layers/{id},{id},{id} (a comma creates a list of layers)
The following parameters are required:
lang (optional): de (default) or fr (there is no description of layers in other language available in geoadmin for now)
project (optional): (default to all) name of the project in which you desire to look for properties (a comma creates a list of projects)
- api-free: layers available for free in the api
- api-notfree: layers which are not available for free in the api and requires swisstopo web access - WMTS documentation
query (optional): a query string for the full text search
properties (optional): (default to all) properties you wich to return (a comma creates a list of properties)
layer (optional): layer you want to return (a comma creates a list of layers)
cb (optional): the name of the callback function
mode (optional): (default to no mode) a mode is defined whenever a particular template is required. The following 4 modes are available:
bodsearch: this mode requires the definition of query string, all the other parameters can be used
legend: returns the legend of a layer, only one layer id must be provided
wmts: returns a GetCapabilities document which provides information about the service along with a description of the layers
preview: returns per default a preview of all the layers in separated and syncronized frames. In conjunction with this mode, the following optional parameters are available:
- width (optional): define the width of the map previews
- lon,lat (optional): define the central point of the map
- zoom (optional): define the zoom level
Examples:
This service allows to obtain elevation information for a polyline. Note: this service is not freely accessible (fee required).
The following parameters are required:
A JSON, with a “profile” root:
This service allows to obtain elevation information for a polyline in CSV format. Note: this service is not freely accessible (fee required).
The following parameters are required:
A csv file with the distance, easting and northing information. One column per elevation model is provided.
This service allows to obtain elevation information for a point. Note: this service is not freely accessible (fee required).
The following parameters are required:
Example: https://api.geo.admin.ch/height?easting=600000&northing=200000
A JSON containing the height information.
This service allows to shorten an URL.
The following parameter is required:
Note: Only url from domain admin.ch are supported.
The short link (for example: https://s.geo.admin.ch/0baf08b)
This service allows to shorten an URL.
The following parameter is required:
Note: Only url from domain admin.ch are supported.
A JSON with a shorturl
This service allows to decode a shortened URL identified by 7 characters.
Redirects to the unshortened URL
A RESTFul implementation of the WMTS OGC standard. For detailed information, see See WMTS OGC standard
The GetCapabilites document provides informations on the service, along with layer description, both in german and french.
http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml or https://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml
http://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml?lang=fr or https://wmts.geo.admin.ch/1.0.0/WMTSCapabilities.xml?lang=fr
Only the RESTFul interface ist implemented. No KVP and SOAP.
A request is in the form:
<protocol>://<ServerName>/<ProtocoleVersion>/<LayerName>/<Stylename>/<Time>/<TileMatrixSet>/<TileSetId>/<TileRow>/<TileCol>.<FormatExtension>
with the following parameters:
| Parameter | Example | Explanation |
|---|---|---|
| Protocol | http ou https | |
| ServerName | wmts[0-4].geo.admin.ch | |
| Version | 1.0.0 | WMTS protocol version |
| Layername | ch.bfs.arealstatistik-1997 | See the WMTS GetCapabilities document. |
| StyleName | default | mostly constant |
| Time | 2010, 2010-01 | Date of tile generation in (ISO-8601). Some dataset will be updated quite often. |
| TileMatrixSet | 21781 (constant) | EPSG code for LV03/CH1903 |
| TileSetId | 22 | Zoom level (see below) |
| TileRow | 236 | |
| TileCol | 284 | |
| FormatExtension | png | Mostly png, except for some raster layer (pixelkarte and swissimage) |
The <TileMatrixSet> 21781 is as follow defined:
MinX 420000
MaxX 900000
MinY 30000
MaxY 350000
TileWidth 256
With the <tileOrigin> in the top left corner of the bounding box.
| Resolution [m] | Zoomlevel | Map zoom | Tile width m | Tiles X | Tiles Y | Tiles | Scale at 96 dpi |
|---|---|---|---|---|---|---|---|
| 4000 | 0 | 1024000 | 1 | 1 | 1 | ||
| 3750 | 1 | 960000 | 1 | 1 | 1 | ||
| 3500 | 2 | 896000 | 1 | 1 | 1 | ||
| 3250 | 3 | 832000 | 1 | 1 | 1 | ||
| 3000 | 4 | 768000 | 1 | 1 | 1 | ||
| 2750 | 5 | 704000 | 1 | 1 | 1 | ||
| 2500 | 6 | 640000 | 1 | 1 | 1 | ||
| 2250 | 7 | 576000 | 1 | 1 | 1 | ||
| 2000 | 8 | 512000 | 1 | 1 | 1 | ||
| 1750 | 9 | 448000 | 2 | 1 | 2 | ||
| 1500 | 10 | 384000 | 2 | 1 | 2 | ||
| 1250 | 11 | 320000 | 2 | 1 | 2 | ||
| 1000 | 12 | 256000 | 2 | 2 | 4 | ||
| 750 | 13 | 192000 | 3 | 2 | 6 | ||
| 650 | 14 | 0 | 166400 | 3 | 2 | 6 | 1 : 2‘456‘694 |
| 500 | 15 | 1 | 128000 | 4 | 3 | 12 | 1 : 1‘889‘765 |
| 250 | 16 | 2 | 64000 | 8 | 5 | 40 | 1 : 944‘882 |
| 100 | 17 | 3 | 25600 | 19 | 13 | 247 | 1 : 377‘953 |
| 50 | 18 | 4 | 12800 | 38 | 25 | 950 | 1 : 188‘976 |
| 20 | 19 | 5 | 5120 | 94 | 63 | 5‘922 | 1 : 75‘591 |
| 10 | 20 | 6 | 2560 | 188 | 125 | 23‘500 | 1 : 37‘795 |
| 5 | 21 | 7 | 1280 | 375 | 250 | 93‘750 | 1 : 18‘898 |
| 2.5 | 22 | 8 | 640 | 750 | 500 | 375‘000 | 1 : 9‘449 |
| 2 | 23 | 9 | 512 | 938 | 625 | 586‘250 | 1 : 7‘559 |
| 1.5 | 24 | 384 | 1250 | 834 | 1‘042‘500 | ||
| 1 | 25 | 10 | 256 | 1875 | 1250 | 2‘343‘750 | 1 : 3‘780 |
| 0.5 | 26 | 11 | 128 | 3750 | 2500 | 9‘375‘000 | 1 : 1‘890 |
| 0.25 | 27 | 12 | 64 | 7500 | 5000 | 37‘500‘000 | 1 : 945 |
| 0.1 | 28 | 13 | 32 | 15000 | 10000 | 150‘000‘000 | 1 : 378 |
Notes
- The zoom level 24 (resolution 1.5m) has been generated, but is not currently used in the API.
- The zoom levels 27 and 28 (resolution 0.25m and 0.1m) are only available for a few layers, e.g. swissimage or cadastral web map. For the others layers it is only a client zoom (tiles are stretched).
This service check the conformity of various OGC services with the swiss ech-0056 profile. See OWSChecker Documentation for more details.
A JSON file containing all the tests and their status.
GcSearch (Geocat Search) allows the user to access the layers stored in GeoCat.
The following parameters are required:
Examples: https://api.geo.admin.ch/main/wsgi/gcsearch/search?query=wasser&lang=de&keyword=wasser
A JSON content is sent back with the following content