Opened 18 years ago

Closed 14 years ago

#1709 closed enhancement (fixed)

Add NODATA format option to OUTPUTFORMAT object

Reported by: perrygeo@… Owned by: warmerdam
Priority: high Milestone: 6.0 release
Component: GDAL Support Version: unspecified
Severity: minor Keywords:
Cc:

Description (last modified by warmerdam)

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.

Change History (1)

comment:1 by warmerdam, 14 years ago

Description: modified (diff)
Milestone: 6.0 release
Resolution: fixed
Status: newclosed

I have implemented support for a NULLVALUE FORMATOPTION in the outputformat object for rawmode images (IMAGEMODE BYTE/INT16/FLOAT32). It is used to preinitialize the empty image, and an attempt is made to preserve the nodata value in the resulting image file when written via GDAL. This is done in trunk (r10099). Also documented (r10098) and added tests (r10100).

The same commits include WCS changes driving this for the wcs use case as described in #655.

Note: See TracTickets for help on using tickets.