3.4. Web Coverage Service (WCS)

The 1.0.0 and 1.1.1 WCS standards implemented in QGIS Server provide a HTTP interface to access raster data, referred to as coverage, coming from a QGIS project.

Especificações:

Standard requests provided by QGIS Server:

Solicitação

Descrição

GetCapabilities

Returns XML metadata with information about the server

DescribeCoverage

Retrieves XML document about additional information about coverages

GetCoverage

Retrieves coverage

3.4.1. GetCapabilities

Standard parameters for the GetCapabilities request according to the OGC WCS 1.1.1 specifications:

Parâmetros

Requerido

Descrição

SERVICE

Sim

Name of the service (WCS)

REQUEST

Sim

Name of the request (GetCapabilities)

VERSION

Não

Versão do serviço

Além dos padrões, o QGIS Server suporta os seguintes parâmetros extras:

Parâmetros

Requerido

Descrição

MAP

Sim

Arquivo de projeto QGIS

Exemplo de URL:

http://localhost/qgis_server?
SERVICE=WCS
&VERSION=1.1.1
&REQUEST=GetCapabilities

XML document example when a single raster layer (named T20QPD_20171123T144719_TCI) is published in the QGIS project for the WCS service:

<WCS_Capabilities xmlns="http://www.opengis.net/wcs" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" updateSequence="0" xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/wcsCapabilities.xsd">
  <Service>
    ...
  </Service>
  <Capability>
    ...
  </Capability>
  <ContentMetadata>
    <CoverageOfferingBrief>
      <name>T20QPD_20171123T144719_TCI</name>
      <label>T20QPD_20171123T144719_TCI</label>
      <lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84">
        <gml:pos>-61.585973 16.331189</gml:pos>
        <gml:pos>-61.52537 16.400376</gml:pos>
      </lonLatEnvelope>
    </CoverageOfferingBrief>
  </ContentMetadata>
</WCS_Capabilities>

VERSÃO

Este parâmetro permite especificar a versão do serviço a ser utilizada. Atualmente, os valores de versão não são usados ​​internamente e sempre retornam para 1.1.1.

3.4.2. DescribeCoverage

This request allows to retrieve additional information about coverages like the format of the underlying datasource, the number of bands, … Standard parameters for the DescribeCoverage request according to the OGC WCS 1.1.1 specifications:

Parâmetros

Requerido

Descrição

SERVICE

Sim

Name of the service (WCS)

REQUEST

Sim

Name of the request (DescribeCoverage)

VERSION

Não

Versão do serviço

COVERAGE

Não

Specify coverage layers (WCS 1.0.0)

IDENTIFIER

Não

Especificar camadas de cobertura (WCS 1.1.1)

Além dos padrões, o QGIS Server suporta os seguintes parâmetros extras:

Parâmetros

Requerido

Descrição

MAP

Sim

Arquivo de projeto QGIS

O documento XML para uma camada raster GeoTIFF de 3 bandas se parece com:

<CoverageDescription xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.opengis.net/wcs" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" updateSequence="0" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/describeCoverage.xsd">
  <CoverageOffering>
    <name>T20QPD_20171123T144719_TCI</name>
    <label>T20QPD_20171123T144719_TCI</label>
    <lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84">
      ...
    </lonLatEnvelope>
    <domainSet>
      ...
    </domainSet>
    <rangeSet>
      <RangeSet>
        <name>Bands</name>
        <label>Bands</label>
        <axisDescription>
          <AxisDescription>
            <name>bands</name>
            <label>bands</label>
            <values>
              <singleValue>1</singleValue>
              <singleValue>2</singleValue>
              <singleValue>3</singleValue>
            </values>
          </AxisDescription>
        </axisDescription>
      </RangeSet>
    </rangeSet>
    <supportedCRSs>
    ...
    </supportedCRSs>
    <supportedFormats nativeFormat="raw binary">
      <formats>GeoTIFF</formats>
    </supportedFormats>
  </CoverageOffering>
</CoverageDescription>

COBERTURA

Este parâmetro, definido no WCS 1.0.0, permite especificar as camadas a serem consultadas por informações adicionais. Os nomes devem ser separados por vírgula.

In addition, QGIS Server introduced an option to select layers by its short name. The short name of a layer may be configured through Properties ► Metadata in layer menu. If the short name is defined, then it’s used by default instead of the layer’s name:

http://localhost/qgisserver?
SERVICE=WCS
&REQUEST=DescribeCoverage
&COVERAGE=mylayer1name,mylayer2shortname

Nota

COVERAGE is mandatory if IDENTIFIER is not set.

IDENTIFICADOR

This parameter replaces the COVERAGE parameter in WCS 1.1.1. But QGIS Server does not filter according to the VERSION parameter so IDENTIFIER and COVERAGE have the same effect.

Nota

IDENTIFIER is mandatory if COVERAGE is not set. If both IDENTIFIER and COVERAGE parameters are defined, COVERAGE is always used in priority.

3.4.3. GetCoverage

This request allows to retrieve the coverage according to specific constraints like the extent or the CRS. Standard parameters for the DescribeCoverage request according to the OGC WCS 1.1.1 specifications:

Parâmetros

Requerido

Descrição

SERVICE

Sim

Name of the service (WCS)

REQUEST

Sim

Name of the request (GetCoverage)

VERSION

Não

Versão do serviço

COVERAGE

Não

Specify coverage layers (WCS 1.0.0)

IDENTIFIER

Não

Especificar camadas de cobertura (WCS 1.1.1)

WIDTH

Sim

Largura da resposta em pixels

HEIGHT

Sim

Altura da resposta em pixels

BBOX

Sim

Extensão do mapa em unidades SRC

CRS

Sim

Sistema de Referência de Coordenadas da extensão

RESPONSE_CRS

Não

Sistema de referência de coordenadas da resposta

Além dos padrões, o QGIS Server suporta os seguintes parâmetros extras:

Parâmetros

Requerido

Descrição

MAP

Sim

Arquivo de projeto QGIS

BBOX

This parameter allows to specify the map extent in the units of the current CRS. Coordinates have to be separated by a comma. The BBOX parameter is formed like minx,miny,maxx,maxy.

Exemplo de URL:

http://localhost/qgisserver?
SERVICE=WCS
&REQUEST=GetCoverage
&IDENTIFIER=T20QPD_20171123T144719_TCI
&BBOX=647533,1805950,660987,1813940
&CRS=EPSG:32620

SRC

This parameter allows to indicate the Spatial Reference System of the BBOX parameter and has to be formed like EPSG:XXXX.

RESPONSE_CRS

This parameter allows to indicate the output response Spatial Reference System and has to be formed like EPSG:XXXX. The CRS of the corresponding coverage layer is used by default.

LARGURA

Este parâmetro permite especificar a largura em pixels da imagem de saída. A resolução da imagem de resposta depende desse valor.

ALTURA

Este parâmetro permite especificar a altura em pixels da imagem de saída. A resolução da imagem de resposta depende desse valor.

../../../_images/server_wcs_getcoverage_width_height.png

Fig. 3.22 From left to right: WIDTH=20&HEIGHT=20, WIDTH=50&HEIGHT=50, WIDTH=100&HEIGHT=100