TrueColor Maplayer from GRASS to Mapserver?

Vortex vortex25 at GMX.DE
Tue May 24 05:28:55 PDT 2005


Hello!

I have a Rastermap in GRASS which i would like to export
and display with the Mapserver. It consists of
3 RGB component layers.
I put them together with r.composite and export it
with r.out.gdal. With type=Byte i get an indexed
Geotiff of 255 Colors. This can be displayed by
Mapserver. Since i want more Colors i tried
type=UInt16. Mapserver can't display this
GeoTiff-File (The file seems to be ok, since qgis can
display it properly using the same libgdal as i think).

Is this a general Issue? Can Mapserver only display
indexed BYTE Images?

Well, i tried to convert it with pct2rgb.py to an
3-band RGB Geotiff. I got an error there:

NameError: global name 'UnsignedInt32' is not defined

I thought it should do no harm if i remove this line,
but i'm not sure. At least the result can't be displayed
with mapserver nor with qgis. Even more strange: The
outline of the solid black output map does not fit
exactly at the old outline and seems to be reprojected!

Since pct2rgb.py seems unuseable at the moment i
wonder if it is possible to export the RGB-GeoTIFF
directly from Grass? r.out.gdal does it with gdal_translate
which should be able to process more than one band. But it
looks like the result of r.composite is
indexed itself already! I suppose the three RGB
component Maps should be feed to gdal_translate
directly. But how?

Thank you very much!
Klaus



More information about the MapServer-users mailing list