WCS 2.0.1 subsetting with other CRS does not follow the standard

Description

Quatation from Web Coverage Service Interface Standard - CRS Extension

Requirement 21 crs-gridded-coverage/getCoverage-rangeSet:
The range values of the response to a successful GetCoverage request containing an
outputCrs parameter shall be determined according to the following conceptual
evaluation model: Take the bounding box of the request’s subsetting parameter (or the full
coverage bounding box if no subsetting was specified in the request); re-project this


bounding box to the output CRS provided; generate the result image extent as the smallest
bounding box around the reprojected subsetting box; fill this new image extent with pixel
values re-projected from the coverage’s Native CRS to the output CRS in a way that, for each
axis, the smallest distance between any two reprojected grid points is used as offset
(including all interpolation and resampling necessary) unless specified otherwise by further
request parameters.

I understand that "fill this new image extent with pixel values" means that if the coverage source has data available then the output image should be full without no-data pixels. This does not seem to be the case with Geoserver 2.14-Snapshot. It seems that the subsetting envelope is converted into native CRS, the subset of coverage is clipped while in the native CRS, and finally the clipped image is warped into OutputCRS. This leads to nodata areas in the output (image 1). But having nodata areas in the output is not the real problem. As can be seen from image 2, the subsetting area (yellow box) that was used in GetCoverage is filled with valid pixels. What is against the standard, if I understand it right, is that the extent of the output image is too large.

"Take the bounding box of the request’s subsetting parameter (or the full coverage bounding box if no subsetting was specified in the request); re-project this bounding box to the output CRS provided; generate the result image extent as the smallest bounding box around the reprojected subsetting box"

In the attached test reques the subsetttingcrs=outputcrs so the bounding box of the outputimage should be equal to subsetting bounding box, not any larger as it is now. The process seems to miss the final step: crop result to envelope of the subsetting bounding box that is re-projected into output CRS.

Test request:

http://localhost:8080/geoserver/wcs?service=WCS&version=2.0.1&request=GetCoverage&CoverageID=nurc__Img_Sample&format=image/geotiff&SUBSET=E(-859802,1648495)&SUBSET=N(2361997,4509563)&subsettingcrs=http://www.opengis.net/def/crs/EPSG/0/32612&OutputCRS=http://www.opengis.net/def/crs/EPSG/0/32612

Environment

None

Status

Assignee

Unassigned

Reporter

Jukka Rahkonen

Triage

None

Fix versions

None

Affects versions

2.13.0

Components

Priority

Medium
Configure