Problem with complex styles

Dirk Jesko ml.dje at GEOCONTENT.DE
Tue May 8 03:07:45 EDT 2007


Hello,

in a map file I have several layers that have a style which is a 
combination of several symbols. For some reason the mapserver only uses 
the last style element if the output format is set to a RGB format, e.g. 
PNG24 or JPEG. If the output format is PC256, e.g. 8 bit PNG, all styles 
are used, and the resulting image is ok. I have attached an excerpt from 
the map file and the symbol definitions. Further, there are three images 
showing the result using two of the defined output formats.

Is there anything wrong with the definitions?

We are currently using Mapserver/MapScript 4.10.0 on Windows.

Kind regards,
Dirk
-------------- next part --------------
SYMBOL
    NAME "gestrichelt"
    TYPE vector
    POINTS
      0 0.5
      0.2 0.5
      -99 -99
      1 0.5
      1.2 0.5
    END
END

SYMBOL
    NAME "schraeg_lu_ro"
    TYPE vector
    POINTS
      0 0
      3 3
    END
END

SYMBOL
    NAME "schraeg_lo_ru"
    TYPE vector
    POINTS
      0 3
      3 0
    END
END

-------------- next part --------------
MAP
  NAME "test"
  EXTENT          4267736 5620000 4692264 5920000
  IMAGETYPE PNG24
  IMAGECOLOR 255 255 255
  STATUS ON
  UNITS METERS
  FONTSET "fonts.txt"
  SYMBOLSET "symbols.txt"
  SHAPEPATH "data"

  OUTPUTFORMAT
    NAME png24
    DRIVER "GD/PNG"
    MIMETYPE "image/png"
    IMAGEMODE RGB
    EXTENSION "png"
    FORMATOPTION "INTERLACE=OFF"
  END
  OUTPUTFORMAT
    NAME png
    DRIVER "GD/PNG"
    MIMETYPE "image/png"
    IMAGEMODE PC256
    EXTENSION "png"
    FORMATOPTION "INTERLACE=OFF"
  END
  OUTPUTFORMAT
    NAME jpeg
    DRIVER "GD/JPEG"
    MIMETYPE "image/jpeg"
    IMAGEMODE RGB
    EXTENSION "jpg"
    FORMATOPTION "INTERLACE=OFF"
    FORMATOPTION "QUALITY=80"
  END

    ...

  PROJECTION
    "init=epsg:31468"     # GK 4 Bessel
  END

  LAYER
      NAME "repm_vrhws"
      TYPE POLYGON
      CONNECTION ...
      CONNECTIONTYPE postgis
      DATA ...
      TEMPLATE "ttt"

      PROJECTION
          "init=epsg:31468"     # GK4 Bessel
      END

      LABELITEM  "nr"
      LABELMAXSCALE 1500000

      CLASSITEM 'themennr'
      CLASS
          NAME "vrhws"
          EXPRESSION '121020'
          STYLE
              COLOR 131 207 210
          END
          STYLE
              SYMBOL "gestrichelt"
              COLOR 28 50 92
              SIZE 2
          END
          LABEL
            TYPE truetype
            COLOR 50 81 114
            SIZE 10
            SHADOWCOLOR 255 255 255
            SHADOWSIZE 1 1
            FONT "Arial-Normal"
            POSITION cc
            MAXSIZE 12
            MINSIZE 8
            MINDISTANCE 20
            PARTIALS true
            ANGLE 0
            WRAP "_"
            ANTIALIAS TRUE
            BUFFER 4
          END
      END
  END

  LAYER
      NAME "repm_vrmil"
      TYPE POLYGON
      CONNECTION ...
      CONNECTIONTYPE postgis
      DATA ...
      TEMPLATE "ttt"

      PROJECTION
          "init=epsg:31468"     # GK4 Bessel
      END

      LABELITEM  "nr"
      LABELMAXSCALE 1500000

      CLASSITEM 'themennr'
      CLASS
          EXPRESSION '122010'
          NAME "vrmil"
          STYLE
              COLOR 221 222 223
          END
          STYLE
              SYMBOL "schraeg_lu_ro"
              COLOR 163 167 169
              SIZE 6
          END
          STYLE
              SYMBOL "schraeg_lo_ru"
              COLOR 163 167 169
              SIZE 6
          END
          LABEL
            TYPE truetype
            COLOR 111 120 122
            SIZE 10
            SHADOWCOLOR 255 255 255
            SHADOWSIZE 1 1
            FONT "Arial-Normal"
            POSITION cc
            MAXSIZE 12
            MINSIZE 8
            MINDISTANCE 20
            PARTIALS true
            ANGLE 0
            WRAP "_"
            ANTIALIAS TRUE
            BUFFER 4
          END
      END
  END
END
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PNG24.png
Type: image/png
Size: 18763 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070508/9d161112/PNG24.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PNG.png
Type: image/png
Size: 12552 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070508/9d161112/PNG.png


More information about the mapserver-users mailing list