Opened 13 years ago

Closed 13 years ago

#3919 closed defect (fixed)

WCS 1.0 does not supports bands= specification properly

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone:
Component: WCS Server Version: unspecified
Severity: normal Keywords: WCS bands
Cc: schpidi, sdlime

Description

I have observed that:

http://demo.mapserver.org/cgi-bin/wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&COVERAGE=modis%2D001&FORMAT=GEOTIFF_RGB&BBOX=159457,4598145,1399957,5501645&WIDTH=248&HEIGHT=180&CRS=EPSG:26915&bands=1

produces a TIFF file with 3 bands instead of subsetting only band 1 as it ought to. Furthermore, I observe that:

http://demo.mapserver.org/cgi-bin/wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&COVERAGE=modis%2D001&FORMAT=GEOTIFF_RGB&BBOX=159457,4598145,1399957,5501645&WIDTH=248&HEIGHT=180&CRS=EPSG:26915&bands=1,2,3

fails with a service exception due to a failure to validate "1,2,3". It seems as the code exists now only a single band may be selected.

I'm not exactly sure what version demo.mapserver.org is running, but I have confirmed a similar problem with mapserver trunk.

I see there are tests in msautotest for band selection against wcs 2.0 but not for 1.0 or seemingly 1.1.

Change History (4)

comment:1 by warmerdam, 13 years ago

Owner: changed from sdlime to warmerdam

I'm going to do a bit of work to try and fix this, but others are welcome to comment.

comment:2 by warmerdam, 13 years ago

I have determined that the &bands=1 option does not give the desired results because of selection of an IMAGEMODE RGB outpuformat (GEOTIFF_RGB). Selecting GEOTIFF_INT16 instead does produce the desired one band file.

I wonder if we ought to detect and produce an exception if the bands selection is incompatible with the output format declaration?

comment:3 by warmerdam, 13 years ago

Status: newassigned

I have corrected the rangeset parameter validation in msWCSValidateRangeSetParam() in trunk (r11818) and backported to 6.0 branch (r11821).

Feedback welcome.

comment:4 by warmerdam, 13 years ago

Resolution: fixed
Status: assignedclosed

Minimal testing added in msautotest (r11823).

Note: See TracTickets for help on using tickets.