[gdal-dev] WCS: Bug in WCSDataset110::GetCoverageRequest()

Odd Ragnar Lydersen Odd-Ragnar.Lydersen at powel.no
Mon Oct 15 23:08:49 PDT 2018


Thanks for the help.
It works like it's supposed to now.

If I use it for this other wcs though, I get an error:
 - URL: "WCS:http://openwms.statkart.no/skwms1/wcs.dtm?VERSION=1.1.1&identifiers=land_utm33_10m"
 - Error message: ERROR 1: msWCSGetCoverage(): WCS server error. A non-zero RESX/RESY or WIDTH/HEIGHT is required but neither was provided.
(If I use vesion 2.0.1 then it's fine)

Is it a server error?
Is there a way around it, by adding some extra parameters?

>Odd-Ragnar<

-----Original Message-----
From: Ari Jolma <ari.jolma at gmail.com> 
Sent: onsdag 10. oktober 2018 15:02
To: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] WCS: Bug in WCSDataset110::GetCoverageRequest()

Hi Odd Ragnar,

Without going very deep into this, I would do (and tried)

gdalinfo "WCS:https://wms.geonorge.no/skwms1/wcs.hoyde-dtm1_32"

This tells me that the preferred version of the service is 2.0.1 and it serves coverage Coverage1. However, if I want to use service version 1.1.1, I do

gdalinfo
"WCS:https://wms.geonorge.no/skwms1/wcs.hoyde-dtm1_32?version=1.1.1"

This tells me that version is ok but now the coverage name is 1, so

gdalinfo
"WCS:https://wms.geonorge.no/skwms1/wcs.hoyde-dtm1_32?version=1.1.1&coverage=1"

tells me details about this coverage which seems to be huge. Now that is the src_dataset string to be used in gdal_translate.

Ari


Odd Ragnar Lydersen kirjoitti 10.10.2018 klo 14:11:
> I have investigated some more now, and I've found that the problem is perhaps the way I'm using the data source/service description file.
>
> Here is what I do:
> 1) I open the wcs by providing the coverage I want by using describecoverage in the url:
> std::string wcsDescribeCoverage = 
> "WCS:https://wms.geonorge.no/skwms1/wcs.hoyde-dtm1_32?SERVICE=WCS&REQU
> EST=DescribeCoverage&IDENTIFIERS=1&VERSION=1.1.1";
> GDALDatasetUniquePtr 
> poDS1(GDALDataset::Open(wcsGetCapabilites.c_str(), GDAL_OF_READONLY, 
> pOptionDriverName, pOptionOpenOptions, nullptr));
>
> Now I have a valid data set, poDS1.
> And a service description file has been created in the cache:
> <WCS_GDAL>
>    <ServiceURL>https://wms.geonorge.no/skwms1/wcs.hoyde-dtm1_32?</ServiceURL>
>    <Version>1.1.1</Version>
>    <CoverageName>1</CoverageName>
>    <Parameters>SERVICE=WCS&REQUEST=DescribeCoverage</Parameters>
>    <TIMEOUT>300</TIMEOUT>
> </WCS_GDAL>
>
> 2) Then I run GDALTranslate(), with a valid argList 
> GDALTranslateOptions *TranslateOptions = 
> GDALTranslateOptionsNew(argList, NULL); GDALDatasetH hOutputDataset = 
> GDALTranslate("./test.xyz", GDALDataset::ToHandle(poDS2.get()), 
> TranslateOptions, NULL);
>
> During the GDALTranslate() I find that in wcsdataset110.cpp, WCSDataset110::GetCoverageRequest(), line 227:
> - After the GetCoverage request have been constructed, the parameters from the service description file is used to overwrite the created request, making it a DescribeCoverage request as stated in the file.
> - And DescribeCoverage don't want IDENTIFIER=someId, but 
> IDENTIFIERS=someId
>
> Then, my question is, how am I supposed to do this, to make it right?
>
>> Odd-Ragnar<
>
> -----Original Message-----
> From: Peter Baumann <p.baumann at jacobs-university.de>
> Sent: tirsdag 9. oktober 2018 15:10
> To: jratike80 <jukka.rahkonen at maanmittauslaitos.fi>; 
> gdal-dev at lists.osgeo.org
> Subject: Re: [gdal-dev] WCS: Bug in 
> WCSDataset110::GetCoverageRequest()
>
>
>
> On 09.10.2018 15:06, jratike80 wrote:
>> Odd Ragnar Lydersen wrote
>>> I think there is a bug in WCSDataset110::GetCoverageRequest()
>>> At line 178: "&VERSION=%s&REQUEST=GetCoverage&IDENTIFIER=%s"
>>> Should be : "&VERSION=%s&REQUEST=GetCoverage&IDENTIFIERS=%s"
>>>
>>> At least that fixes my problem, and I can get one step further in my 
>>> effort to use the wcs driver, using C++ API, on Windows.
>>>
>>>> Odd-Ragnar<
>> Hi,
>>
>> I believe that GDAL is right and the WCS server that you are using is wrong.
>> By reading the standard
>> https://portal.opengeospatial.org/files/07-067r5
>> the name of the parameter in GetCoverage is "identifier". However, 
>> for making it a bit more complicated for the developers it is called 
>> "identifiers" in DescribeCoverage.
> well, design by committee effect if you will: DescribeCoverage can have more than one parameters, so it was requested to change to plural in the course of the adoption discussions.
> whatever way you do it, you will do it wrong ;-)
>
> cheers,
> Peter (WCS/CIS spec editor)
>
>
>> "This single ―identifiers parameter shall correspond to the 
>> repeatable ―identifier parameter in the UML model."
>>
>> -Jukka Rahkonen-
>>
>>
>>
>>
>> --
>> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
> --
> Dr. Peter Baumann
>   - Professor of Computer Science, Jacobs University Bremen
>     www.faculty.jacobs-university.de/pbaumann
>     mail: p.baumann at jacobs-university.de
>     tel: +49-421-200-3178, fax: +49-421-200-493178
>   - Executive Director, rasdaman GmbH Bremen (HRB 26793)
>     www.rasdaman.com, mail: baumann at rasdaman.com
>     tel: 0800-rasdaman, fax: 0800-rasdafax, mobile: +49-173-5837882 
> "Si forte in alienas manus oberraverit hec peregrina epistola incertis 
> ventis dimissa, sed Deo commendata, precamur ut ei reddatur cui soli 
> destinata, nec preripiat quisquam non sibi parata." (mail disclaimer, 
> AD 1083)
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list