[mapserver-users] Does Mapserver WCS 1.0.0 respect OFFSITE of tileindex layer?

Frank Warmerdam warmerdam at pobox.com
Mon Apr 19 09:48:01 EDT 2010


Rahkonen Jukka wrote:
> Hi,
> 
> I am trying to push some imagery through WCS version 1.0.0 and Mapserver
> version 5.2.1.  The layer (coverage), is made from reprojected,
> uncompressed tiff files which are combined to Mapserver LAYER through
> tileindex.  Due to reprojection they have offsite areas which have been
> set to RGB: 0 0 0 when saved from gdalwarp.  Check with gdalinfo
> confirms this.  Mapfile LAYER includes row OFFSITE 0 0 0.  The layer
> behaves fine through WMS but when I save images to geotiffs from WCS
> services the offsite areas are not transparent but black.  My geotiff
> outputformat is
> 
>   OUTPUTFORMAT
>     NAME "GEOTIFF"
>     DRIVER "GDAL/GTiff"
>     MIMETYPE "image/tiff"
>     IMAGEMODE "BYTE"
>     EXTENSION "tif"
>   END
> 
> and WCS request like 
> http://localhost/cgi-bin/wcs?SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCovera
> ge&COVERAGE=TILEINDEX&FORMAT=image/tiff&CRS=EPSG:3067&ResX=0.5&ResY=0.5&
> BBOX=309688,6700284,313688,6704284
> 
> Should I advertise the source NODATA value in some other way for WCS?

Jukka,

Generally WCS generated geotiffs will not have a way to represent nodata
in a way that a client application is likely to recognise them as nodata.
By default pixels which are assigned no value from the source dataset are
set to zero.

That said, I have recently added support for better WCS nodata handling
in trunk.   There you can attach a metadata item like:

     "wcs_rangeset_nullvalue" "0"

and the null value will be inserted in the output file whereever there is
no value. Also,when the output format supports it, this will be formally
marked as the nodata value.  In GeoTIFF this is accomplished via a tiff
tag that is GDAL specific, so generally only GDAL based applications will
be affected.

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    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list