[mapserver-users] Paletted TIFFs and WCS [Was: geotiff 48bit with mapserver 7 wms]

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Tue Apr 25 02:36:55 PDT 2017


Hi,

Cora told about his problems with WCS and 8-bit input images in another thread that was originally dealing with 16-bit RBG images. That thread was http://osgeo-org.1560.x6.nabble.com/geotiff-48bit-with-mapserver-7-wms-td5316916.html

I had a look at the test image from  https://www.bscw.nrw.de/pub/bscw.cgi/7035084
The image appears to be a paletted one:

gdalinfo original_image.tif
Driver: GTiff/GeoTIFF
Files: original_image.tif
Size is 3200, 3200
Coordinate System is `'
Metadata:
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_SOFTWARE=IrfanView
  TIFFTAG_XRESOLUTION=508
  TIFFTAG_YRESOLUTION=508
Image Structure Metadata:
  COMPRESSION=PACKBITS
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 3200.0)
Upper Right ( 3200.0,    0.0)
Lower Right ( 3200.0, 3200.0)
Center      ( 1600.0, 1600.0)
Band 1 Block=3200x2 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 256 entries)
...

I do not know how to handle paletted input rasters with Mapserver properly. What I have done is to convert the paletted images first into RGB images with http://www.gdal.org/pct2rgb.html. In my case the source images were also using different palettes which was another reason for using pct2rgb.

Cora, I suggest you to have a try with converting your 8-bit single band paletted maps into 8-bit RGB images with pct2rgb.py.

-Jukka Rahkonen-



More information about the mapserver-users mailing list