Skip to content
Snippets Groups Projects
Commit edb4a366 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Add WMS query template docs

parent ab58f04e
Branches
No related tags found
No related merge requests found
......@@ -55,6 +55,13 @@ $ gdal_translate -ot Int16 -of GTiff -b 1 NETCDF:"tmp/result.nc":WARNING_STATUS
### Set up a WMS (Web Map Service)
[Introduction to WMS (Wikipedia)](https://en.wikipedia.org/wiki/Web_Map_Service)
A WMS can be created using server platforms such as:
* [MapServer](https://mapserver.org/)
* [GeoServer](https://geoserver.org/)
* [ArcGIS server](https://enterprise.arcgis.com/en/server/) (proprietary)
The code/configuration examples below are for MapServer.
## The structure of the WMS
VIPS expects the WMS to follow certain patterns in order to display it in a map.
......@@ -123,6 +130,42 @@ LAYER
```
This will result in correct color presentation in the map, and the availability of a legend for the map (see the upper right corner in the screenshot above)
### WMS queries
A feature request to a WMS layer should get an XML response following this structure
```xml
<?xml version="1.0" encoding="UTF-8"?>
<vipsResult>
<modelName value="Carrot rust fly temperature model"/>
<modelId value="PSILARTEMP"/>
<!--[ACTUAL DATA]-->
</vipsResult>
```
The `[ACTUAL_DATA]` are elements with parameter names and values. For instance:
```xml
<!--mapserver template-->
<?xml version="1.0" encoding="UTF-8"?>
<vipsResult>
<modelName value="Carrot rust fly temperature model"/>
<modelId value="PSILARTEMP"/>
<parameter name="DD" value="46.2"/> <!-- Day degrees for the selected location at a given time -->
</vipsResult>
```
If you click on the WARNING_STATUS layer, you get a special response, the `warningStatus` element:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<vipsResult>
<modelName value="Carrot rust fly temperature model"/>
<modelId value="PSILARTEMP"/>
<warningStatus value="3"/> <!-- Moderate infection risk for the selected location at a given time -->
</vipsResult>
```
### Multi language support
Mapserver supports the &language=[language code] query parameter. Read more about the specifics [here](https://mapserver.org/ogc/inspire.html). Through this, we have been able to add language specific titles and abstracts. See an example below
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment