by David Crowther
How can I create a WMS Layer in MapThat using data from the Environment Agency?
MapThat is fully compatible with Web Map Services (WMS) and using GeoServer you can create your own WMS Layers and even render their Legend Categories within MapThat. Here is a useful blog on this :
MapThat Creating WMS Legends - https://www.cadlinecommunity.co.uk/hc/en-us/articles/360004162377-MapThat-Creating-WMS-Legends
We also recommend going to source and linking MapThat directly to external data providers such as the Environment Agency who provide many useful datasets for you to both download and/or access via a Web Map Service (WMS).
To successfully display these WMS Layers in your MapThat simply follow the steps below:
1 – Access Data.Gov.Uk
Within the DATA.GOV.UK website there is a specific section for environmental datasets as supplied by the Defra Data Services Platform.
Within the Search panel, type your search text e.g. Sites of Special Scientific Interest and press Search. The results are then listed below the search options.
Choose the best match, in this case I will choose the top record and the main details page opens for that Data Layer.
We have a number of data access options including:
- ArcGIS Feature Layers
- Web Feature Services (WFS)
- Web Map Services (WMS)
- Direct Download
The Direct Download link – Available Downloadable Datasets – link will open the DEFRA Spatial Data Download web map, where you can zoom to your area of interest and download data in a number of spatial formats e.g. SHP, KML, TAB, GeoJSON etc….
We will explore the Direct Download options in another blog soon!
For this blog we will simply choose to Copy the WMS link to clipboard.
Having copied the WMS to Clipboard the value can be pasted into a notepad for using later.
2 – Create the MapThat compatible URL
In order for MapThat to render this WMS, follow these simple steps:
A – take the original WMS url that you copied from the Defra website - https://environment.data.gov.uk/spatialdata/sites-of-special-scientific-interest-england/wms
B – append the following static text - ?service=WMS&version=1.3.0&request=GetMap&layers=
C – finally, append on the layer name onto the end, but replace any DASH (-) with an UNDERSCORE(_) – sites_of_special_scientific_interest_england
The full MapThat Compatible WMS URL will therefore be:
3 – Create a MapThat WMS Layer
Now that we have constructed the URL, we can create a MapThat WMS Layer using the MapThat Admin Forms.
Use the LAYERS > Data Layers menu to access existing and create new MapThat Layers.
It’s always easier to use the CLONE Layer tool to make a copy of an existing WMS Layer, as many of the options will be the same. In this instance I will copy my existing Listed Buildings WMS Layer to create a Clone.
Now edit the newly Cloned Layer and change the values/settings as needed.
- Edit the Layer Name
- Edit the WMS/WMTS Link to use the newly constructed WMS
- Edit the Bubble to remove or add as needed
- Edit the Layer Icon to use an appropriate icon e.g. Pink Square for SSSI
Finally, ensure that the new WMS Layer has been exposed in a LAYER HEADER (Tree).
Log back into MapThat and tick to display the new WMS Layer and the features for that now layer will now be drawn using the latest data feed from the Environment Agency.