WCS & pseudocolor table

Frank Warmerdam warmerdam at POBOX.COM
Mon Mar 6 20:23:27 EST 2006


Shoaib Burq wrote:
> 
>     Shoaib,
> 
>     This isn't a bug, by the way.  In "picture" mode MapServer is no way
>     obligated to preserve the original pixel values, and doing so is quite
>     meaningless in the vector rendering case.
> 
>  
> humm.... I guess that's true for WMS but for a WCS I was under the 
> impression data integrity is crucial, no?

Shoaib,

As long as WCS runs in "raw mode", the original pixel values
should be preserved.  Of course, we come full circle to the fact
that rawmode does not currently support colortables.  There is no
compelling reason it could not, but it isn't currently part of
the raw mode data model.  I believe someone else has already created
a bug report on that, though I'm not promising if/when it will be
dealt with.

> What was the projection of the WCS request?  The projection of
> the result image will be determined by the projection object set
> on the map object at render time.  In the WCS case this normally
> comes from the client.
>  
> Using the WCS CGI request I specify "crs=EPSG:4283" which is GDA94 as 
> per data at the server. but for some reason this is not honoured.

Ah.  The problem is that MapServer uses PROJ.4 format as it's internal
representation of coordinate systems, and it is very bad at identifying
datums.  So when you say epsg:4283 it is internally expanded to:

   +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs

When mapserver goes to write this to TIFF it is written as ellipsoid GRS80.

You might want to file a bug on this.  It *might* be possible for me
to find the epsg:n value in cases like this and generate a proper
GeoTIFF definition based on that.  This isn't normally an issue in
mapserver since it doesn't normally produced products with embedded
coordinate systems.  WCS is somewhat special in this regard.

These issues are of general enough interest that I have taken the liberty
of cc:ing my response back to the list.

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