Raster Resampling problem in 4.8beta2

Ken Lord kenlord at GMAIL.COM
Sun Dec 11 04:54:27 EST 2005


Hi List,

I've just upgraded a site to MapServer 4.8beta2 from 4.4.1, using the
windows binary available at maptools.org/dl

I'm seeing an raster resampling problem.

When I zoom out, and a larger part of raster data sources are
resampled down to fit the map, it starts to resemble that old 256
colour limit in the mapserver 3.6 days with really wrong colours
overtaking the rasters ... and only affecting the raster layers, the
vector layers always draw fine.

I am using a 24bit output format (see below).

The problem affects rasters layer by layer,  having multiple raster
layers turned on doesn't change how the individual rasters are
affected.

I didnt see this problem at all using MapServer 4.4.1.

I've looked at a few different raster layers, some are satellite
images, some are coloured geophysics images and all have the problem
in a similar fashion whether they are 24bit, 8bit (256 colour), or
8bit (120 colour).

The only difference is that the 120 colour raster, which had been down
sampled to display properly in mapserver 3.6, is not as badly
affected. In this case some of the colours end up resampled to match
my no-data offsite colour and just become transparent in the map, a
coincidence of where the offsite colour bin falls within this raster's
colour table I assume.

Is there a processing directive that will force resolution
downsampling without colour-matching the remaining pixels?

Here are examples of a good and bad map ... I've set the background
colour of the map to red to highlight the problem. The geophysics
layer really gets hacked up in the bad one, loosing a few colours.

Good map:
http://cariboo-gold.no-ip.info/IWA11342917155380.jpg

Bad map:
http://cariboo-gold.no-ip.info/IWA11342916912848.jpg


Here's a typical Layer ... by the way thanks for fixing the REQUIRES tag!

LAYER
  NAME LANDSAT7FC
  TYPE RASTER
  STATUS ON
  DATA "LANDSAT7_15m_8bit_IWA.tif"
  REQUIRES "![Global_LandSat7_WMS]"
  OFFSITE 0 0 0
  PROJECTION
   "init=EPSG:26910"
  END
  METADATA
     WMS_TITLE "LandSat7 15m Bands321"
     WMS_ABSTRACT "LandSat7"
     WMS_SRS "EPSG:26910"
  END
END


My outputformat is:

OUTPUTFORMAT
  NAME jpeg
  DRIVER "GD/JPEG"
  MIMETYPE "image/jpeg"
  IMAGEMODE RGB
  EXTENSION "jpg"
  FORMATOPTION "QUALITY=90"
END

Thanks for reading another one of my marathon messages,
Ken Lord
Vancouver BC



More information about the mapserver-users mailing list