[gdal-dev] WCS Driver - Wrong request when

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


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}",
outfile = "outputRaster.tif"
gdal.Translate(outfile, ds, projWin=target_area)

The performed request is:


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?

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