Assigning NODATA value to WCS output

Frank Warmerdam warmerdam at POBOX.COM
Fri Mar 10 13:47:18 EST 2006


Matthew Perry wrote:
> Hey folks,
> 
>    I've got a bunch of SRTM tiles as GeoTiffs that I successfully set
> up as a WCS server.  The original TIFFs don't have a NODATA value
> defined and neither does the WCS output by default.  Is it possible to
> assign an a NODATA value to WCS output with mapserver?
> 
>  I suppose another option (if I can free up some disk space) is to use
> gdal_translate to assign a nodata value to the input data. If the
> original tiffs had a nodata value, would the WCS output reflect that?

Matt,

There is currently no support in MapServer WCS for saving nodata values
in files produced through a GDAL outputformat driver regardless of
what is set in the input file.

It would be pretty easy to add this as a FORMATOPTION in the outputformatobj.
Not so easy to carry it from the source since WCS can be serving from
several files and there is nowhere obvious to put it in the imageObj and
related structures of mapserver.

If a FORMATOPTION on the OUTPUTFORMAT object would satisfy your needs, then
submit an enhancement request in bugzilla and I'll try to add it in 4.9.

Hmm, when I think about it this raises some questions about nodata handling
in the "rawdata" imagemodes.  I suspect unset areas are just set to zero.
It may be that a more comprehensive plan on nodata handling is needed for
the WCS.  However, I'm afraid that this isn't currently something I have
time to pursue deeply.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-users mailing list