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:
This returns the TIFF in the same spatial resolution as in the source data.
adding scalefactor=0.25
works:
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)
-
did you check the standard? opengeospatial.org/standards/wcsIan Turton– Ian Turton2020年02月12日 13:41:50 +00:00Commented Feb 12, 2020 at 13:41
-
1To 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– nmtoken2020年02月12日 14:05:07 +00:00Commented Feb 12, 2020 at 14:05
1 Answer 1
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:
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>