[gdal-dev] WCS Driver - Wrong request when

Alberto Paradís Llop albertoparadisllop at gmail.com
Wed Sep 8 01:14:26 PDT 2021


Hi,

I've been having some issues getting the WCS driver to behave correctly.
However, I am new to GIS so it's very likely I'm doing something wrong.

When performing a request on a coverage whose CRS is EPSG:4326, if the
projWin contains a negative longitude, the driver requests instead the
coverage extent's minimum longitude. For example, when requesting projWin
[-0.15, 39.5, 0.15, 39.2], the driver instead performs a request on [-6.5 ,
39.5, 0.15, 39.33], where -6.5 is the requested coverage's minimum
longitude. I have not been able to test if this is also the case for the
other axis. It results in the following error:

ERROR 1: Returned tile does not match expected configuration.
Got 6015x163 instead of 263x163.


I've been performing my requests through Python:

target_area = [-0.15, 39.5, 0.15, 39.2]
global url, layername
ds = gdal.OpenEx(f"WCS:{url}&coverage={layername}",
open_options=["NoGridAxisSwap=TRUE"])
outfile = "outputRaster.tif"
gdal.Translate(outfile, ds, projWin=target_area)

The performed request is:

https://URL/geoserver/wcs?SERVICE=WCS&REQUEST=GetCoverage&VERSION=2.0.1&COVERAGEID=geonode__F4_2020fromASC&SUBSET=Long%28-6.37708333,0.15000002403500634%29&SUBSET=Lat%2839.200000020966016,39.500000021936252%29&Format=image/tiff


This approach works when target_area does not contain a negative longitude,
like for projWin [0.1, 39.5, 0.4, 39.2]

Is there something wrong with this approach? What would the correct way to
request this area be?

Thanks,
Alberto Paradís
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210908/158a63b1/attachment.html>


More information about the gdal-dev mailing list