2

I have implemented a GeoTIFF image layer usinga WCS service in GeoServer 2.2.4. I have searched on the net for operations supported by WCS... it tells me about three operations:

GetCapabilities, DescribeCoverage and GetCoverage

I have used these operations using HTTP request and all are working perfectly.

My questions are:

  • is there any other way to use these operations other than HTTP request (if yes, please explain with some example)

  • does WCS support any other feature/facility/operation other than the above mentioned operations.

Is it possible to apply stretch operations (standard deviation/histogram etc) and other operations on GeoTIFF image in GeoServer using WCS?

3

1 Answer 1

6

You are correct, a Web Coverage Service (WCS) only supports the following operations:

GetCapabilities example GetCapabilities request

Reading the response will tell you what HTTP methods are supported (and as you can see in this example GET and POST are supported)

DescribeCoverage example DescribeCoverage request

Reading this response describes the coverage, but doesn't give you any of the coverage data. You can request more than one coverage in this operation by supplying a comma separated list of CoverageIds

GetCoverage

A standard GetCoverage operation returns the full coverage (as per the above examples), but it is also possible to apply Trimming and Slicing operations to return some subset of the coverage.

Trimming WCS subsetting trim operation

POST example for trim on two axes

<?xml version="1.0" encoding="UTF-8"?>
<wcs:GetCoverage xmlns:wcs="http://www.opengis.net/wcs/2.0"
  xmlns:gml="http://www.opengis.net/gml/3.2"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/wcs/2.0 ../../wcsAll.xsd"
  service="WCS" version="2.0.0">
    <wcs:CoverageId>bgs_rs</wcs:CoverageId>
<wcs:DimensionTrim>
    <wcs:Dimension>x</wcs:Dimension>
    <wcs:TrimLow>400000.744</wcs:TrimLow>
    <wcs:TrimHigh>401000.744</wcs:TrimHigh>
</wcs:DimensionTrim>
<wcs:DimensionTrim>
    <wcs:Dimension>y</wcs:Dimension>
    <wcs:TrimLow>500000.644</wcs:TrimLow>
    <wcs:TrimHigh>501000.644</wcs:TrimHigh>
</wcs:DimensionTrim>
</wcs:GetCoverage>

Slicing WCS subsetting slice operation

POST example for slice on two axes

<?xml version="1.0" encoding="UTF-8"?>
<wcs:GetCoverage xmlns:wcs="http://www.opengis.net/wcs/2.0"
  xmlns:gml="http://www.opengis.net/gml/3.2"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/wcs/2.0 ../../wcsAll.xsd"
  service="WCS" version="2.0.0">
<wcs:CoverageId>bgs_rs</wcs:CoverageId>
<wcs:DimensionSlice>
    <wcs:Dimension>x</wcs:Dimension>
    <wcs:SlicePoint>400000.744</wcs:SlicePoint>
</wcs:DimensionSlice>
<wcs:DimensionSlice>
    <wcs:Dimension>y</wcs:Dimension>
    <wcs:SlicePoint>500000.644</wcs:SlicePoint>
</wcs:DimensionSlice>
</wcs:GetCoverage>

Note that for every slice you lose a dimension, so in this example (and the image) if you slice on two dimensions you end up with a point.

In answer to the third part of question

It's not possible to apply a contrast stretch etc. using WCS (that is by sending such a request to a WCS service) because the WCS standard does not support those sorts of operations.

You could of course apply such operations on an image that has been returned by a WCS service through a WCS client, just as you could with any other image.

If you want to apply those sort of operations to the raw data (and get the result through some client) you will need a Web Coverage Processing Service (WCPS).

Then you can use WCPS abstract syntax to create a query like:

Using a GET request to a WCPS service to do a contrast stretch on a LANDSAT tile (p204r021d20020326) as a False Colour Composite RED:band 4, GREEN:band 3, BLUE:band 2

Currently GeoServer does not support WCPS operations

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.