# WCS -- OGC Web Coverage Service

The optional GDAL WCS driver allows use of a coverage in a WCS server as a raster dataset. GDAL acts as a client to the WCS server.

Accessing a WCS server is accomplished by creating a local service description xml file looking something like the following, with the coverage server url, and the name of the coverage to access. It is important that there be no spaces or other content before the `<WCS_GDAL>` element.

    <WCS_GDAL>
      <ServiceURL>http://laits.gmu.edu/cgi-bin/NWGISS/NWGISS?</ServiceURL>
      <CoverageName>AUTUMN.hdf</CoverageName>
    </WCS_GDAL>

When first opened, GDAL will fetch the coverage description, and a small test image to establish details about the raster. This information will be cached in the service description file to make future opens faster - no server access should be required till imagery is read for future opens.

The WCS driver should support WCS 1.0.0 and 1.1.0 servers, but WCS 0.7 servers are not supported. Any return format that is a single file, and is in a format supported by GDAL should work. The driver will prefer a format with "tiff" in the name, otherwise it will fallback to the first offered format. Coordinate systems are read from the DescribeCoverage result, and are expected to be in the form of `EPSG:n` in the `>supportedCRSs<` element.

The service description file has the following additional elements as immediate children of the `WCS_GDAL` element that may be optionally set.

- PreferredFormat: the format to use for GetCoverage calls.

- BandCount: Number of bands in the dataset, normally captured from the sample request.
- BandType: The pixel data type to use. Normally established from the sample request.
- BlockXSize: The block width to use for block cached remote access.
- BlockYSize: The block height to use for block cached remote access.
- NoDataValue: The nodata value to use for all the bands (blank for none). Normally defaulted from CoverageOffering info.
- Timeout: The timeout to use for remote service requests. If not provided, the libcurl default is used.
- UserPwd: May be supplied with userid:password to pass a userid and password to the remote server.
- HttpAuth: May be BASIC, NTLM or ANY to control the authentication scheme to be used.
- OverviewCount: The number of overviews to represent bands as having. Defaults to a number such that the top overview is fairly smaller (less than 1K x 1K or so).
- GetCoverageExtra: An additional set of keywords to add to GetCoverage requests in URL encoded form. eg. "&RESAMPLE=BILINEAR&Band=1"
- DescribeCoverageExtra: An additional set of keywords to add to DescribeCoverage requests in URL encoded form. eg. "&CustNo=775"
- Version: Set a specific WCS version to use. Currently defaults to 1.0.0 and 1.1.0 is also supported.
- FieldName: Name of the field being accessed. Used only with WCS 1.1.0+. Defaults to the first field in the DescribeCoverage result.

See Also:

- OGC WCS Standards