Novice help with raster

Brent Wood pcreso at PCRESO.COM
Wed Oct 27 22:12:45 EDT 2004


--- Frank Warmerdam <warmerdam at pobox.com> wrote:

> Brent Wood wrote:
> > The geotiff is a 1024x1024 pixel image, colour depth 16.
>
> Brent,
>
> Just what exactly do you mean by a color depth of 16?  16 colors in a
> colormap  or a 16bit single band image with 64K colors?  A 16bit greyscale >
> image that you would like to have colors applied to?
>
> Could you provide a tiffinfo and/or
> gdalinfo report on the file in question?
>

I can indeed (& thanks for your help & patience!) gdalinfo output below

baw at a64:~/wgtn_topo> gdalinfo test_geo.tif
Driver: GTiff/GeoTIFF
Size is 1024, 1024
Coordinate System is `'
Origin = (174.599756,-41.000220)
Pixel Size = (0.00048828,-0.00043945)
Metadata:
  TIFFTAG_DOCUMENTNAME=test.tif
  TIFFTAG_IMAGEDESCRIPTION=Image generated by ESP Ghostscript (device=ppmraw)

  TIFFTAG_SOFTWARE=ImageMagick 5.5.7 04/06/04 Q16 http://www.imagemagick.org
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
Corner Coordinates:
Upper Left  ( 174.5997559, -41.0002197)
Lower Left  ( 174.5997559, -41.4502196)
Upper Right ( 175.0997556, -41.0002197)
Lower Right ( 175.0997556, -41.4502196)
Center      ( 174.8497557, -41.2252197)
Band 1 Block=1024x8 Type=Byte, ColorInterp=Red
Band 2 Block=1024x8 Type=Byte, ColorInterp=Green
Band 3 Block=1024x8 Type=Byte, ColorInterp=Blue
baw at a64:~/wgtn_topo>


With all my normal image viewing packages, this displays in colour, just the
output from mapsever is grayscale, whether I have png, png24 or jpeg output.

The layer info for the geotiff image layer from the map file is:

...
LAYER
  NAME test_geo
  DATA "/home/baw/wgtn_topo/test_geo.tif"
  TYPE RASTER
  STATUS DEFAULT
  CLASS
    NAME "Test_geo"
    # TEMPLATE
  END
END
...


I have tried it with a: PROCESSING "BANDS-1,1,3" entry after "TYPE RASTER" but
get the error message:

msDrawMap(): Image handling error. Failed to draw layer named 'test_geo'.
 drawGDAL(): Unable to access file. Attempt to classify 24bit image, this is
unsupported.


If it would be useful I can send you the geotiff, bzipped up it is 1Mb..

Thanks,

  Brent



More information about the mapserver-users mailing list