Opened 14 years ago

Closed 14 years ago

#3429 closed defect (wontfix)

Problem with multiple class styles when using attribute as color

Reported by: rafalmag Owned by: pramsey
Priority: normal Milestone:
Component: PostGIS Interface Version: 5.6
Severity: major Keywords: postgis attribute color style
Cc: woodbri

Description

When rendering a map with defined 2 styles and the second style is using attribute as color only the first style is rendered.

After rendering I always get wide, grey line. The one from second style is never rendered. But, when I change "[mycolor]" to "255 0 0" it is red, as it was supposed to be.

My temporary solution: When I delete first style (one with grey color) I get thin, red line (red is from column mycolor)

How to reproduce:

  1. Define layer with data from PostGIS database.
  2. In PostGIS table (next to the geom column) provide column called "mycolor" (type TEXT) with example data like: "255 0 0" or "#ff0000".
  3. Use following styles:
    CLASS
           NAME    "line3"
           STYLE
                   SYMBOL "my_line"
                   COLOR 125 125 125 #gray
                   SIZE 8
                   ANTIALIAS TRUE
           END
           STYLE
                   SYMBOL "my_line"
                   COLOR [mycolor]
                   SIZE 6
                   ANTIALIAS TRUE
           END
    END
    

Where Symbol "my_line" is defined as:

SYMBOL
	NAME "my_line"
	TYPE cartoline
	LINECAP butt
	LINEJOIN round
	ANTIALIAS TRUE
END

Mapserver compiled from latest source (mapserver-5.6.3.tar.gz):

$ ./mapserv -v
MapServer version 5.6.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS INPUT=TIFF INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

PS: Please correct component if needed.

Change History (6)

comment:1 by woodbri, 14 years ago

Rafal also report that we do not appear to support colors of the form "#ff0000" in an attribute column, which should get fixed or at least documented.

comment:2 by woodbri, 14 years ago

Cc: woodbri added

comment:3 by pramsey, 14 years ago

Does this only occur in PostGIS? If you dump table as shape file and use that, is result different?

comment:4 by rafalmag, 14 years ago

I am afraid that my case is far more complex than what it looks like. I use SQL function to generate that color request. I solved (actually omitted) this problem by moving "grey style" to bottom layer - it is not so fast, but my project can handle this.

Please try to reproduce problem on your own.

comment:5 by pramsey, 14 years ago

I have other work than trying to reproduce problems that may or may not exist. If you can show a case that works in shape file and doesn't work in PostGIS and attach a map file and table dump that produce the problem, I'll fix it. If you have a simple case that fails for both shape and PostGIS we should change the component.

comment:6 by pramsey, 14 years ago

Resolution: wontfix
Status: newclosed

Feel free to re-open if there is more information available.

Note: See TracTickets for help on using tickets.