TransWikia.com

Exporting WMS Images/Tiles to our Area of Interest

Geographic Information Systems Asked by ar-siddiqui on November 29, 2020

Is there a way to clip WMS layers to our area of interest.

I have the following WMS layer that I want to clip for Polygon shown in Red.

enter image description here

I am getting the following error message if I try with SAGA Clip for Raster (and a similar message for GDAL).

enter image description here

2 Answers

This methodology has worked for me:

  1. Zoom to Area of Interest
  2. Open QGIS Network logger (>3.5 but <= 3.12) (you do NOT need this plugin if running QGIS 3.14 or higher! Networklogging is in QGIS itself since QGIS Pi / 3.14. Just press F12!)
  3. See what request URL that WMS is requesting - copy it.
  4. Run Download File Algorithm in QGIS, paste that URl
  5. It will download the tile as a raster file.

Correct answer by ar-siddiqui on November 29, 2020

Is there a way to clip WMS layers to our area of interest

The quick answer here as alluded to in comments, is yes, because that's what a WMS does; it gives a representation of some data usually as an image according to a bounding box. So if you have a bounding box, you can make a request for your area of interest directly (in a browser). A WMS request to fetch an image would look like:

https://www.mrlc.gov/geoserver/mrlc_display/NLCD_2016_Land_Cover_L48/ows?version=1.3.0&service=WMS&layers=NLCD_2016_Land_Cover_L48&styles&crs=epsg:2240&format=image/png&request=GetMap&width=500&height=500&BBOX=-247656.2,5428981.3,-240280.6,5434540.1&

Which gives us:

GetMap example request as image

In QGIS you are doing requests like this every time you zoom and pan the map canvas, for your WMS layer.

If you want to export the WMS for the AOI then you can do so using the Processing Toolbox > Raster Tools > Convert Map to Raster

Answered by nmtoken on November 29, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP