Using WCS vendor parameters

As with WFS, WMS, or WPS, vendors have the option of extending WCS capabilities with custom parameters. This way some extra functions can be delivered to users to help them manage their coverages.

In the case of WCS, GeoServer offers a basic customization; you can use a vendor parameter to filter out results according to a namespace.

How to do it…

  1. Create a request for the WCS capabilities with cURL:
    $ curl -u admin:geoserver -XGET -H 'Accept: text/xml' -G http://localhost:8080/geoserver/wcs 
     -d service=WCS 
     -d version=1.0.0 
     -d request=GetCapabilities 
     -d namespace=NaturalEarth 
     -o coverages.xml
    
  2. Now open the file that stores the results and check that only the coverages from the NaturalEarth namespace are listed:
    
    <wcs:CoverageSummary>
        <ows:Title>blueMarble</ows:Title>
        <ows:Abstract>Generated from GeoTIFF</ows:Abstract>
        <ows:Keywords>
            <ows:Keyword>WCS</ows:Keyword>
            <ows:Keyword>GeoTIFF</ows:Keyword>
            <ows:Keyword>blueMarble</ows:Keyword>
        </ows:Keywords>
        <ows:WGS84BoundingBox>
            <ows:LowerCorner>-180.0 -90.0</ows:LowerCorner>
            <ows:UpperCorner>180.0 90.0</ows:UpperCorner>
        </ows:WGS84BoundingBox>
        <wcs:Identifier>blueMarble</wcs:Identifier>
    </wcs:CoverageSummary>
    
    <wcs:CoverageSummary>
        <ows:Title>colourRelief</ows:Title>
        <ows:Abstract>Generated from GeoTIFF</ows:Abstract>
        <ows:Keywords>
            <ows:Keyword>WCS</ows:Keyword>
            <ows:Keyword>GeoTIFF</ows:Keyword>
            <ows:Keyword>colourRelief</ows:Keyword>
        </ows:Keywords>
        <ows:WGS84BoundingBox>
            <ows:LowerCorner>12.06486111111111 42.033750000000005</ows:LowerCorner>
            <ows:UpperCorner>12.88375 42.508472222222224</ows:UpperCorner>
        </ows:WGS84BoundingBox>
        <wcs:Identifier>colourRelief</wcs:Identifier>
    </wcs:CoverageSummary>
    
    

How it works…

Unsurprisingly, the option is very easy to use. When adding the namespace parameter to the request, the coverages list is filtered. Using this option, you can split your data into logical groups. Be aware that using an incorrect namespace, one that doesn't exist in your GeoServer, does not return any error; you will simply obtain an empty list.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.100.237