Strange colors behavior
Sylvain Perrinel
sylvain.perrinel at AGRICULTURE.GOUV.FR
Wed Mar 29 23:34:59 PST 2006
Hi list,
I have got a map which behave strangely.
At full extent without label, the colors are correct. But if I put
labels on my map, the colors are strange (pink is grey, orange is
yellow, ...).
And with labels, if I zoom in, the colors become standard. I display
only one layer with classes.
I use Mapscript to make the mapfile and Mapserver 4.6.1 to generate the
images.
Here is the mapfile :
MAP
EXTENT 730454 2213900 840549 2339370
FONTSET
"/geobase/local/web/geoweb/donnees_mapserver/symbols_and_fonts/fonts.txt"
IMAGECOLOR 255 255 255
IMAGETYPE gif
SYMBOLSET
"/geobase/local/web/geoweb/donnees_mapserver/symbols_and_fonts/symbols.sym"
SHAPEPATH "/var/www/tileindex/"
SIZE 500 500
STATUS ON
UNITS METERS
NAME "Zonages_agricoles"
OUTPUTFORMAT
NAME "png"
MIMETYPE "image/png"
DRIVER "GD/PNG"
EXTENSION "png"
IMAGEMODE "PC256"
TRANSPARENT FALSE
FORMATOPTION "INTERLACE=OFF"
END
PROJECTION
"init=epsg:27582"
END
LEGEND
IMAGECOLOR 255 255 255
KEYSIZE 20 10
KEYSPACING 5 5
LABEL
SIZE MEDIUM
TYPE BITMAP
BUFFER 0
COLOR 0 0 0
FORCE FALSE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
POSITION CC
END
POSITION LL
STATUS OFF
END
QUERYMAP
COLOR 255 255 0
SIZE -1 -1
STATUS OFF
STYLE HILITE
END
REFERENCE
COLOR -1 0 0
EXTENT 730454 2.2139e+06 840549 2.33937e+06
IMAGE
"/geobase/local/web/geoweb/donnees_mapserver/images_ref//021-cotes-d-or.png"
OUTLINECOLOR -1 0 0
SIZE 140 140
STATUS ON
MARKER 0
MARKERSIZE 0
MINBOXSIZE 3
MAXBOXSIZE 0
END
SCALEBAR
BACKGROUNDCOLOR 255 255 255
COLOR 0 0 0
IMAGECOLOR 255 255 255
INTERVALS 5
LABEL
SIZE MEDIUM
TYPE BITMAP
BUFFER 0
COLOR 0 0 0
FORCE FALSE
MINDISTANCE -1
MINFEATURESIZE -1
OFFSET 0 0
PARTIALS TRUE
END
OUTLINECOLOR 0 0 0
POSITION LC
SIZE 400 5
STATUS ON
STYLE 1
TRANSPARENT TRUE
UNITS METERS
END
WEB
IMAGEPATH "/geobase/local/web/geoweb/tmp/"
IMAGEURL "/tmp/"
LOG "/geobase/local/web/geoweb/donnees_mapserver/log/log_mapserver"
METADATA
"wms_srs" "epsg:27582"
"wms_onlineresource"
"http://geoweb.ddaf21.agri/cgi-bin/mapserv?map=/geobase/local/web/geoweb/donnees_mapserver/stock_mapfiles/zonages_agricoles.map&"
"wms_abstract" "Cartes des différents zonages concernant le SEA"
"Type_acces_rapide" "com"
"code_dpt_acces_rapide" "021"
"Extent_original" "730454;2213900;840549;2339370"
"title" "Zonages agricoles"
"wms_encoding" "UTF-8"
"wms_title" "Zonages_agricoles"
END
QUERYFORMAT text/html
END
LAYER
CLASSITEM "NOM_CT"
CONNECTION
"/geobase/local/web/geobase/CONSULTATION/AGRICULTURE/N_AGRI_ENVIRONNEMENT/N_ZONAGE_CAD_021.TAB"
CONNECTIONTYPE OGR
LABELCACHE OFF
LABELITEM "NOM_CT"
LABELMAXSCALE 1e+06
LABELMINSCALE 10000
METADATA
"wms_srs" "epsg:27582"
"wms_abstract" "Territoires d\'application des contrats-types CAD"
"LAYERNAME" "Zones CAD"
"OriginalLabelItem" "NOM_CT"
"ExistLabel" "True"
"wms_title" "Zones_CAD"
END
NAME "Zones_CAD"
SIZEUNITS METERS
STATUS OFF
TOLERANCE 0
TOLERANCEUNITS PIXELS
TRANSPARENCY 100
TYPE POLYGON
UNITS METERS
CLASS
NAME "Plaine"
EXPRESSION ([ID_CT]=21000001)
LABEL
SIZE 12
TYPE TRUETYPE
BACKGROUNDCOLOR 0 0 0
BACKGROUNDSHADOWCOLOR 0 0 0
BACKGROUNDSHADOWSIZE 0 0
BUFFER 0
COLOR 237 224 17
ENCODING "UTF-8"
FORCE FALSE
MINDISTANCE 0
MINFEATURESIZE 0
OFFSET 0 0
OUTLINECOLOR 0 0 0
PARTIALS TRUE
POSITION CC
SHADOWCOLOR 0 0 0
SHADOWSIZE 0 0
END
METADATA
END
STYLE
ANGLE 360
COLOR 237 224 17
MAXSIZE 6
MINSIZE 5
OUTLINECOLOR 237 224 17
SIZE 5
SYMBOL 23
END
TEMPLATE "blank.html"
END
CLASS
NAME "Montagne Dijonnaise"
EXPRESSION ([ID_CT]=21000002)
LABEL
ANGLE 0.000000
ANTIALIAS TRUE
FONT Vera-sans
MAXSIZE 24
MINSIZE 10
SIZE 12
TYPE TRUETYPE
BACKGROUNDCOLOR 0 0 0
BACKGROUNDSHADOWCOLOR 0 0 0
BACKGROUNDSHADOWSIZE 0 0
BUFFER 2
COLOR 3 136 187
ENCODING "UTF-8"
FORCE FALSE
MINDISTANCE 2
MINFEATURESIZE 0
OFFSET 0 0
OUTLINECOLOR 0 0 0
PARTIALS TRUE
POSITION CC
SHADOWCOLOR 0 0 0
SHADOWSIZE 0 0
END
METADATA
END
STYLE
ANGLE 360
COLOR 3 136 187
MAXSIZE 6
MINSIZE 5
OUTLINECOLOR 3 136 187
SIZE 5
SYMBOL 23
END
TEMPLATE "blank.html"
END
CLASS
NAME "Massif forestier"
EXPRESSION ([ID_CT]=21000003)
LABEL
ANGLE 0.000000
ANTIALIAS TRUE
FONT Vera-sans
MAXSIZE 24
MINSIZE 10
SIZE 12
TYPE TRUETYPE
BACKGROUNDCOLOR 0 0 0
BACKGROUNDSHADOWCOLOR 0 0 0
BACKGROUNDSHADOWSIZE 0 0
BUFFER 2
COLOR 0 181 0
ENCODING "UTF-8"
FORCE FALSE
MINDISTANCE 2
MINFEATURESIZE 0
OFFSET 0 0
OUTLINECOLOR 0 0 0
PARTIALS TRUE
POSITION CC
SHADOWCOLOR 0 0 0
SHADOWSIZE 0 0
END
METADATA
END
STYLE
ANGLE 360
COLOR 0 181 0
MAXSIZE 6
MINSIZE 5
OUTLINECOLOR 0 181 0
SIZE 5
SYMBOL 23
END
TEMPLATE "blank.html"
END
CLASS
NAME "Plateau Chatillonnais"
EXPRESSION ([ID_CT]=21000004)
LABEL
ANGLE 0.000000
ANTIALIAS TRUE
FONT Vera-sans
MAXSIZE 24
MINSIZE 10
SIZE 12
TYPE TRUETYPE
BACKGROUNDCOLOR 0 0 0
BACKGROUNDSHADOWCOLOR 0 0 0
BACKGROUNDSHADOWSIZE 0 0
BUFFER 2
COLOR 222 158 70
ENCODING "UTF-8"
FORCE FALSE
MINDISTANCE 2
MINFEATURESIZE 0
OFFSET 0 0
OUTLINECOLOR 0 0 0
PARTIALS TRUE
POSITION CC
SHADOWCOLOR 0 0 0
SHADOWSIZE 0 0
END
METADATA
END
STYLE
ANGLE 360
COLOR 222 158 70
MAXSIZE 6
MINSIZE 5
OUTLINECOLOR 222 158 70
SIZE 5
SYMBOL 23
END
TEMPLATE "blank.html"
END
CLASS
NAME "Morvan"
EXPRESSION ([ID_CT]=21000005)
LABEL
ANGLE 0.000000
ANTIALIAS TRUE
FONT Vera-sans
MAXSIZE 24
MINSIZE 10
SIZE 12
TYPE TRUETYPE
BACKGROUNDCOLOR 0 0 0
BACKGROUNDSHADOWCOLOR 0 0 0
BACKGROUNDSHADOWSIZE 0 0
BUFFER 2
COLOR 0 130 93
ENCODING "UTF-8"
FORCE FALSE
MINDISTANCE 2
MINFEATURESIZE 0
OFFSET 0 0
OUTLINECOLOR 0 0 0
PARTIALS TRUE
POSITION CC
SHADOWCOLOR 0 0 0
SHADOWSIZE 0 0
END
METADATA
END
STYLE
ANGLE 360
COLOR 0 130 93
MAXSIZE 6
MINSIZE 5
OUTLINECOLOR 0 130 93
SIZE 5
SYMBOL 23
END
TEMPLATE "blank.html"
END
CLASS
NAME "Auxois"
EXPRESSION ([ID_CT]=21000006)
LABEL
ANGLE 0.000000
ANTIALIAS TRUE
FONT Vera-sans
MAXSIZE 24
MINSIZE 10
SIZE 12
TYPE TRUETYPE
BACKGROUNDCOLOR 0 0 0
BACKGROUNDSHADOWCOLOR 0 0 0
BACKGROUNDSHADOWSIZE 0 0
BUFFER 2
COLOR 0 0 255
ENCODING "UTF-8"
FORCE FALSE
MINDISTANCE 2
MINFEATURESIZE 0
OFFSET 0 0
OUTLINECOLOR 0 0 0
PARTIALS TRUE
POSITION CC
SHADOWCOLOR 0 0 0
SHADOWSIZE 0 0
END
METADATA
END
STYLE
ANGLE 360
COLOR 0 0 255
MAXSIZE 6
MINSIZE 5
OUTLINECOLOR 0 0 255
SIZE 5
SYMBOL 23
END
TEMPLATE "blank.html"
END
CLASS
NAME "Territoires viticoles"
EXPRESSION ([ID_CT]=21000007)
LABEL
ANGLE 0.000000
ANTIALIAS TRUE
FONT Vera-sans
MAXSIZE 24
MINSIZE 10
SIZE 12
TYPE TRUETYPE
BACKGROUNDCOLOR 0 0 0
BACKGROUNDSHADOWCOLOR 0 0 0
BACKGROUNDSHADOWSIZE 0 0
BUFFER 2
COLOR 133 39 199
ENCODING "UTF-8"
FORCE FALSE
MINDISTANCE 2
MINFEATURESIZE 0
OFFSET 0 0
OUTLINECOLOR 0 0 0
PARTIALS TRUE
POSITION CC
SHADOWCOLOR 0 0 0
SHADOWSIZE 0 0
END
METADATA
END
STYLE
ANGLE 360
COLOR 133 31 199
MAXSIZE 6
MINSIZE 5
OUTLINECOLOR 133 31 199
SIZE 5
SYMBOL 23
END
TEMPLATE "blank.html"
END
CLASS
NAME "Val de Saône"
EXPRESSION ([ID_CT]=21000008)
LABEL
ANGLE 0.000000
ANTIALIAS TRUE
FONT Vera-sans
MAXSIZE 24
MINSIZE 10
SIZE 12
TYPE TRUETYPE
BACKGROUNDCOLOR 0 0 0
BACKGROUNDSHADOWCOLOR 0 0 0
BACKGROUNDSHADOWSIZE 0 0
BUFFER 2
COLOR 241 138 241
ENCODING "UTF-8"
FORCE FALSE
MINDISTANCE 2
MINFEATURESIZE 0
OFFSET 0 0
OUTLINECOLOR 0 0 0
PARTIALS TRUE
POSITION CC
SHADOWCOLOR 0 0 0
SHADOWSIZE 0 0
END
METADATA
END
STYLE
ANGLE 360
COLOR 241 138 214
MAXSIZE 6
MINSIZE 5
OUTLINECOLOR 241 138 214
SIZE 5
SYMBOL 23
END
TEMPLATE "blank.html"
END
END
END
--
Sylvain Perrinel
Ministère de l'Agriculture et de la Pêche
SG/SM/SDSI/CERIT
Département d'Information Géographique (DIG)
BP 12668
31326 Castanet Tolosan
Téléphone: 05.61.28.92.76
Web : http://10.202.61.44/sigsiti/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: without_label.png
Type: image/png
Size: 12425 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060330/c67179d6/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: with_labels.png
Type: image/png
Size: 22642 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060330/c67179d6/attachment-0001.png>
More information about the MapServer-users
mailing list