[maplab-users] colors problem
Dean Gadoury
dgadoury at dmsolutions.ca
Wed Apr 14 08:38:40 EDT 2004
Hi Charles,
I've run into this problem before when using images. The output format
you have specified only allows for 256 colors after those are all used
there are no more colors available. Your orthophoto probably contains
256 colors so MapServer draws the roads in one of the greys available in
the pallette. You have a couple of options:
1. You could reduce the number of colors in your orthophoto
2. You could try specifying png24 as your output format since it can
handle more colors. Try this outputformat object:
OUTPUTFORMAT
NAME "png24"
MIMETYPE "image/png"
DRIVER "GD/PNG"
EXTENSION "png"
IMAGEMODE RGB
TRANSPARENT FALSE
END
I would recommend trying option #2 first.
Dean
Charles.Blais at agr.gouv.qc.ca wrote:
>Hi,
>
>I have an orthophoto with a road coverage on top of it. My road layer is set
>to red color, but when I preview the map, they are gray instead of red. If I
>put the orthophoto off, the road layer is red ??? What I'm doing wrong ?
>
>Thanks
>
>Charles
>
>
>I use :
>- win2000
>- Maplab-2.1-rc3
>- Mapserver 4.0.1
>
>
>Here is my mapfile :
>
>MAP
> NAME "DEMO"
> STATUS ON
> EXTENT 372022.15 5112846 388707.85 5129541
> SIZE 700 700
> SHAPEPATH "./data"
> SYMBOLSET "./etc/symbols.sym"
> FONTSET "./etc/fonts.txt"
> IMAGETYPE png
> IMAGECOLOR 255 255 255
> UNITS METERS
> WEB
> MINSCALE 1000
> MAXSCALE 5e+007
> IMAGEPATH "c:/ms_tmp/"
> IMAGEURL "/ms_tmp/"
> END
> REFERENCE
> STATUS ON
> IMAGE "images/keymap.png"
> SIZE 100 75
> EXTENT -2.2e+006 -712631 3.0728e+006 3.84e+006
> COLOR -1 -1 -1
> OUTLINECOLOR 255 0 0
> MINBOXSIZE 3
> MAXBOXSIZE 0
> MARKER 0
> MARKERSIZE 0
> END
> QUERYMAP
> STATUS OFF
> SIZE -1 -1
> COLOR 255 0 0
> STYLE HILITE
> END
> PROJECTION
> "init=epsg:2145"
> END
> LEGEND
> STATUS ON
> IMAGECOLOR 255 255 255
> POSITION LL
> KEYSIZE 18 12
> KEYSPACING 5 5
> TEMPLATE
>"c:/apache_group/apache/htdocs/maplab-2.1-rc3/htdocs/mapbrowser/legend_templ
>ate.html"
> LABEL
> TYPE BITMAP
> SIZE MEDIUM
> OFFSET 0 0
> BUFFER 0
> MINDISTANCE -1
> MINFEATURESIZE -1
> COLOR 0 0 89
> PARTIALS TRUE
> FORCE FALSE
> END
> END
> SCALEBAR
> STATUS ON
> COLOR 255 255 255
> OUTLINECOLOR 0 0 0
> BACKGROUNDCOLOR 0 0 0
> IMAGECOLOR 255 255 255
> UNITS KILOMETERS
> INTERVALS 5
> SIZE 150 5
> STYLE 0
> POSITION LL
> LABEL
> TYPE BITMAP
> SIZE SMALL
> OFFSET 0 0
> BUFFER 0
> MINDISTANCE -1
> MINFEATURESIZE -1
> COLOR 0 0 0
> PARTIALS TRUE
> FORCE FALSE
> END
> END
> OUTPUTFORMAT
> NAME "png"
> MIMETYPE "image/png"
> DRIVER "GD/PNG"
> EXTENSION "png"
> IMAGEMODE PC256
> TRANSPARENT FALSE
> END
> LAYER
> NAME "ortho"
> STATUS ON
> DATA "../Marguerite/Orthophoto.tif"
> TYPE RASTER
> UNITS METERS
> SIZEUNITS PIXELS
> TOLERANCE 0
> TOLERANCEUNITS PIXELS
> END
> LAYER
> NAME "road"
> STATUS ON
> DATA "../Marguerite/road.shp"
> TYPE LINE
> UNITS METERS
> SIZEUNITS PIXELS
> MINSCALE 1
> MAXSCALE 5000
> TOLERANCE 0
> TOLERANCEUNITS PIXELS
> PROJECTION
> "init=epsg:4326"
> END
> CLASS
> NAME "road"
> STYLE
> SYMBOL 7
> COLOR 255 0 0
> OUTLINECOLOR 255 0 0
> BACKGROUNDCOLOR 255 0 0
> SIZE 4
> MINSIZE 1
> MAXSIZE 100
> END
> END
> END
>END
>
>
>_______________________________________________
>Maplab-users mailing list
>Maplab-users at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/maplab-users
>
>
>
--
___________________________
Dean Gadoury
DM Solutions Group
30 Rosemount Ave. Suite 200
Ottawa, Ontario. K1Y 1P4
613.565.5056 ext. 24
dgadoury at dmsolutions.ca
www.dmsolutions.ca
More information about the Maplab-users
mailing list