0

I am a GIS novice attempting to use QGIS (version 3.12.3-București) to link to a UK Environment Agency flood zone dataset using the various data links provided here:

https://data.gov.uk/dataset/cf494c44-05cd-4060-a029-35937970c9c6/flood-map-for-planning-rivers-and-sea-flood-zone-2

Using the base WFS/WMS URLs provided just returns an error, but following the advice at 'https://support.environment.data.gov.uk/hc/en-gb/articles/360001340657-How-do-i-add-WFS-layers-in-ArcGIS-and-QGIS-' and adding parameters, I do manage to import some partial data using this URL:

https://environment.data.gov.uk/spatialdata/flood-map-for-planning-rivers-and-sea-flood-zone-2/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAME=Flood_Map_for_Planning_Rivers_and_Sea_Flood_Zone_2&BBOX=450660,332709,461502,347119,EPSG:27700&srsName=EPSG:27700

The layer data imported isn’t correct (it doesn’t match any watercourses and only covers a small area near Nottingham - see screenshot), but it at least shows that the API link works!

Screenshot

Does anyone have any experience of accessing this specific data using and has made it work correctly with QGIS, or can at least suggest what else I might try?

3
  • 1
    I didn't try very hard, but couldn't get the WMS working, but the WFS works fine (environment.data.gov.uk/spatialdata/…). Make sure you add it as a WFS, not a WMS.
    – user2856
    Jun 9 '20 at 12:08
  • https://environment.data.gov.uk/spatialdata/flood-map-for-planning-rivers-and-sea-flood-zone-2/wms? is WMS end point, and https://environment.data.gov.uk/spatialdata/flood-map-for-planning-rivers-and-sea-flood-zone-2/wfs? is WFS end point. Browsing to either without request parameters will give warning Query Parameters must include Request
    – nmtoken
    Jun 9 '20 at 12:33
  • UK? Environment Agency is only England but sponsored by the UK Government. (Scotland and Wales have their versions and share their data slightly differently).
    – Mapperz
    Jun 9 '20 at 13:06
2

You had gone a fair bit of the way. Consider the final URL carefully: https://environment.data.gov.uk/spatialdata/flood-map-for-planning-rivers-and-sea-flood-zone-2/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAME=Flood_Map_for_Planning_Rivers_and_Sea_Flood_Zone_2&BBOX=450660,332709,461502,347119,EPSG:27700&srsName=EPSG:27700

Everything after ? is a query string that serve to constrain or increase the specifity of what that service is giving back to you. Importantly, the BBOX=450660,332709,461502,347119 part is restricting the extent of the output: this is why you only get partial data.

If you just take the root of that URL (i.e. https://environment.data.gov.uk/spatialdata/flood-map-for-planning-rivers-and-sea-flood-zone-2/wfs) you can use that in QGIS. Right click on WFS / OGC API - Features > New Connection > Name it whatever you like > Enter https://environment.data.gov.uk/spatialdata/flood-map-for-planning-rivers-and-sea-flood-zone-2/wfs in the URL > Press OK > It should display (it might prompt you about doing a coordinate transformation too, just click OK and accept whatever it offers to do).

Note that there's a fair bit of data there and it might take some time to download.

This kind of service is generally known as a "web feature service", or WFS. Searching for that will probably help you.

enter image description here

8
  • 1
    The WFS does not match up, neither with different datum transformations, not axis inversion. The WMS layer has perfect match when use with ?crs=EPSG:227700 attached to the base URL, and according QGIS project CRS
    – geozelot
    Jun 9 '20 at 13:02
  • Agreed. You could try asking about this problem on the Defra Data Services Forum: support.environment.data.gov.uk/hc/en-gb/community/topics/…
    – nhopton
    Jun 9 '20 at 15:08
  • when you add the base map you probably need to change the project projection to EPSG:3857 - QGIS will then make the rest line up to the base map for you
    – Ian Turton
    Jun 10 '20 at 7:14
  • I have followed the @Alphabetasoup response and this seems like a more robust approach than I was previously trying (Layer -> Add Layer -> Add Vector Layer). I can make the data connections using the Browser as both WMS and WFS. With respect to displaying adding the data as layers, WMS doesn't display anything and WFS only displays as mirrored across a line that runs from southeast to northwest. Playing with inversion options doesn't fix this and adding '?crs=EPSG:227700' doesn't help either. I have tried asking the question at support.environment.data.go.uk and a response is awaited.
    – Jinks
    Jun 10 '20 at 10:28
  • ...I also have no problem adding the downloaded shapefiles for the same data in the correct locations. It is just the WFS/WMS links that are causing me problems. I am looking to access the live data to make sure I am always using the most up-to-date information without having to constantly check for updates.
    – Jinks
    Jun 10 '20 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.