[mapserver-users] Mapserver 6 - Background color shift

Karl Suiter karl.suiter at gmail.com
Fri May 20 14:36:51 EDT 2011


Hi All,

  I'm hoping someone has experienced this or knows how to fix this problem.

  In currently running Mapserver 5.6 on Redhat Enterprise Linux 5
(compiled from source, no issues).  Wanting to test version 6, I
compiled the latest Mapserver 6 release on Redhat Enterprise Linus 5.
I updated the required libraries (gdal, gd, png, jpg, etc) and it did
compiled successfully.

  Running ./mapserv -v list out the usual configuration parameters.

  However, when creating a map from a mapfile using cgi-bin, the map
is drawn correctly except for the map background.  All maps are drawn
with a yellow background color.  It's as if the first decimal value is
set to zero or is missing (e.g., version 6 is rendering IMAGECOLOR as
255 255 0 instead of the 0 255 0 I specify in the mapfile)..

  I've recompiled, checked the gdal, gd and png versions, tried
different mapfiles, etc., but the color shift issue persists.

  Here are the library versions, the mapserv -v output and a mapfile snippet.

  gdal 2.0.24
  gd 1.8.0
  geos 3.2.0
  proj 4.7.0
  jpeg 8c
  png 1.5.2
  tiff 3.9.2

 ./mapserv6 -v
MapServer version 6.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG
SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=THREADS SUPPORTS=GEOS INPUT=OGR
INPUT=GDAL INPUT=SHAPEFILE

MAP
  NAME "WORLD"
  IMAGETYPE      PNG
  EXTENT         -180 -90 180 90
  SIZE           700 500
  SHAPEPATH      "/var/www/html/mapdata/world/"
  IMAGECOLOR     255 255 255
  FONTSET        "/var/www/html/fonts/fonts.list"
  CONFIG GDAL_DATA "/usr/local/share/gdal"

  PROJECTION
     "epsg:4326"
     "proj=longlat"
     "ellps=WGS84"
     "datum=WGS84"
     "no_defs"
  END

  LAYER # States polygon layer begins here
    NAME         BASE
    DATA         world_adm0.shp
    STATUS       OFF
    TYPE         POLYGON
    LABELITEM    "NAME"
    CLASSITEM    "GMI_CNTRY"
    CLASS
      NAME       "THE_WORLD"
      STYLE
        COLOR    176 255 176
        OUTLINECOLOR 32 32 32
      END
      EXPRESSION /./
      LABEL
        MAXSCALEDENOM    25
        COLOR 0 0 0
        TYPE POINT
        FONT verdana
        SIZE 10
        ANTIALIAS TRUE
        POSITION CC
        PARTIALS FALSE
        MINDISTANCE 300
        BUFFER 4
      END
    END
END


------

Cheers,

Karl


More information about the mapserver-users mailing list