diff --git a/grid_models.md b/grid_models.md index 89a3bd9bf09019dda18852483184b3adaa31e0ff..b93720869762cf27d2d8b618e3a288c8e403fc7e 100644 --- a/grid_models.md +++ b/grid_models.md @@ -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