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.baum...@jacobs-university.de>
Sent: tirsdag 9. oktober 2018 15:10
To: jratike80 <jukka.rahko...@maanmittauslaitos.fi>;
gdal-dev@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@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.baum...@jacobs-university.de
tel: +49-421-200-3178, fax: +49-421-200-493178
- Executive Director, rasdaman GmbH Bremen (HRB 26793)
www.rasdaman.com, mail: baum...@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@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev