[gdal-dev] WCS driver

Ari Jolma ari.jolma at gmail.com
Wed Oct 25 00:21:47 PDT 2017


Even Rouault kirjoitti 24.10.2017 klo 20:23:
>
> On mardi 24 octobre 2017 17:07:51 CEST Ari Jolma wrote:
>
> > Whoa! How hard can XML be? I have a real Capabilities document (from
>
> > well known company) which defines *both* default and ows namespace to
>
> > http://www.opengis.net/ows/2.0.
>
> >
>
> > Thus, to be sure, I need to look for *both* ows:ServiceIdentification
>
> > and ServiceIdentification. Or maybe loop through all elements and check
>
> > for both at each element?
>
> If there's no ambiguity with elements having same names in different 
> namespaces, you can just strip namespace prefixes from elements with
>
> CPLStripXMLNamespace(psRoot, NULL, true)
>

I implemented a solution, where the namespace prefixes is a list 
(CPLStringList). That is probably a general solution and actually quite 
simple.

Some fundamental thoughts on how to use the driver. The idea is to allow 
starting from a GetCapabilities request. The initial dataset name is thus

WCS:URL

where the URL may be without any parameters. We'll add service and 
request parameters but *not* version or acceptVersions since the server 
should return the latest supported version. The one I test with seems to 
return 1.1.2 and 2.0.1 only when requested. We'll leave it to user to 
add the version/acceptVersions. The user can also add updateSequence and 
other parameters. If the user adds coverage/identifiers/coverageId then 
we'll proceed directly to DescribeCoverage or further to GetCoverage if 
there are bounding boxes or such. DescribeCoverage is needed unless it 
is cached (see below) since it probably contains important metadata 
(nodata value, min and max values etc).

Errors are reported to the user - it is important to know whether the 
error is HTTP 404 or ExceptionReport InvalidParameterValue.

The driver currently honors some HTTP parameters such as timeout length, 
authorization etc. and they are in the service XML. How to forward them 
to the driver in the case of this simple dataset name case? Environment 
variables or somehow coded into the dataset name? (for example 
"WCS:x=y,URL=url" ?)

Also, it would be useful to cache at least the capabilities and coverage 
description. I have not yet thought much about that but using something 
like $HOME/.gdal/wcs_cache would be preferred I guess? Then there is the 
question how the user can control refreshing the cache - with options as 
above?

Ari

> -- 
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171025/b55fc202/attachment.html>


More information about the gdal-dev mailing list