1

I have a GeoServer serving GeoTIFFs as WCS. I would like to get a slice (bbox) of a coverage at a specific resolution.

MapServer seems to support this:

WIDTH=output_width: Width in pixels of map picture. One of WIDTH/HEIGHT or RESX/Y is required.

HEIGHT=output_height: Height in pixels of map picture. One of WIDTH/HEIGHT or RESX/Y is required.

(source: https://mapserver.org/de/ogc/wcs_server.html)

If I add this to my WCS request, it is ignored:


http://192.168.37.10:8080/geoserver/wcs?request=GetCoverage&coverageId=ml__Duesseldorf&height=512&width=512&service=WCS&version=2.0.1&subset=E(355017.6407251246,355761.0022115205)&subset=N(5679871.219933263,5680544.231752177)

This returns the TIFF in the same spatial resolution as in the source data.


adding scalefactor=0.25 works:

http://192.168.37.10:8080/geoserver/wcs?request=GetCoverage&coverageId=ml__Duesseldorf&scalefactor=0.25&service=WCS&version=2.0.1&subset=E(355017.6407251246,355761.0022115205)&subset=N(5679871.219933263,5680544.231752177)

This works but I can only scale the whole image, while I would like to set a specific resolution. for example: height=51 width=512


Also I wonder if there is any documentation for GeoServer WCS that explains all the parameters that can be used?

(bbox for example also doesn't work as well)

2
  • did you check the standard? opengeospatial.org/standards/wcs – Ian Turton Feb 12 '20 at 13:41
  • 1
    To understand the capabilities of any service you need to look at the GetCapabilities response. For WCS 2 that will give you a list of profiles supported, and thus the parameters. – nmtoken Feb 12 '20 at 14:05
3

SCALESIZE can be used to set the size of a of request. This is defined in:

OGC® WCS Interface Standard - Scaling Extension, version 1.0.0

The spec defines the kvp for Scal::ScaleToSize as SCALESIZE=a1(s1),…,an(sn) For my usecase this means that the KVP has to look like this:

SCALESIZE=i(512),j(512)

with the full request:

http://192.168.37.10:8080/geoserver/wcs?request=GetCoverage&coverageId=ml__Duesseldorf&SCALESIZE=i(512),j(512)&service=WCS&version=2.0.1&subset=E(355017.6407251246,355761.0022115205)&subset=N(5679871.219933263,5680544.231752177)

Note that the name of the axis is the abbreviation of the axis, while subset requires the full names.

These names can be extracted from a DescribeCoverage request:

...
<wcs:CoverageDescriptions ...>
  <wcs:CoverageDescription>
    <gml:boundedBy>
      ...

      <gml:Envelope ... axisLabels="E N">


      </gml:Envelope>
    </gml:boundedBy>
    ...
    <gml:domainSet>
      <gml:RectifiedGrid>
        ...

        <gml:axisLabels>i j</gml:axisLabels>


    </gml:domainSet>
    ...
  </wcs:CoverageDescription>
</wcs:CoverageDescriptions>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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