1

I am trying to extract a subset of data from WCS Coverage. I right-click the coverage > Export > Save As. This brings in this dialog box.

enter image description here

But when I export it does not snap the raster cell to the original raster and the cell size changes as well. See this:

enter image description here

Is there a way in QGIS to get raster data from WCS for a particular area and have cells exactly the same as raw data?

Request sent by QGIS is:

http://localhost:8080/qgis-server/WCSServer?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&FORMAT=GeoTIFF&COVERAGE=dem&BBOX=11878792.03174479678273201,7007814.11248470470309258,11882060.6795082800090313,7011082.79411716014146805&CRS=EPSG:2283&RESPONSE_CRS=EPSG:2283&WIDTH=1000&HEIGHT=1000
4
  • If you require the exact raster data and you already have it on disk then just use that
    – Ian Turton
    Commented May 8, 2021 at 15:52
  • No I don't have the raster data on disk. Commented May 8, 2021 at 19:28
  • What GetCoverage request is generated by QGIS?
    – nmtoken
    Commented May 12, 2021 at 8:33
  • @nmtoken This is the request QGIS is sending when panning the map: localhost:8080/qgis-server/… Commented May 12, 2021 at 14:44

1 Answer 1

1

Note in the WCS 1.0.0 specification it tells us that (I've split the paragraph to emphasise how to avoid resampling):

In response to a GetCoverage request, a WCS server will return a grid of the requested size covering the requested area. This usually requires interpolating / resampling the coverage values stored on the server.

To avoid any interpolation / resampling, clients should request the coverage in a native CRS stated by the server; and select a GML Envelope whose extent exactly matches that of the requested GML Grid. For such a request, if the chosen CRS is “Image” or “Engineering”, the Envelope and Grid must both describe grids of the same size. For other CRSs, the Envelope and Grid must be related by the offsetVector values in the coverage description (if supplied in the coverage description).

1
  • Based on my research since I posted the question, I have also come to the conclusion that in version 1.0 the only way to get exact data is if your extent exactly matches the snapping and resolution is also the same. Is the GML envelope part for post requests? Commented May 13, 2021 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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