[mapserver-dev] Bug in trunk? layer with object getting rendered by two classes

Stephen Woodbridge woodbri at swoodbridge.com
Tue Apr 3 11:41:04 EDT 2012


Hi all,

I think I have found a weird bug where an objects are getting rendered 
by two classes in a layer, which is counter to my understanding of how 
this should work. Here is the scenario, drawing tiger roads I have a lot 
of class to deal with rendering styles for various categories. I have 
removed a bunch of classes that did not pertain to this issue. In the 
mapfile fragment below I have marked the two classes the are getting 
rendered. The second class has a restricted scale on it that is a 
narrower range that the first class and they have different expressions, 
but I would still expect the object to only be rendered once.

Does this look like a bug? I'll write it up if so. Does this description 
provide enough detail to find the bug in the code. If not I can try to 
make a simplified example.

Thanks,
   -Steve W

     LAYER
         NAME "roads"
         METADATA
             "ows_title"     "Roadway features"
             "ows_srs"       "EPSG:4269 EPSG:4326"
             "ows_abstract"  "Road way features from the U.S. Census 
ROADS data layer."
         END
         TYPE LINE
         TILEINDEX "tidx-ROADS"
         PROJECTION
             "+proj=longlat +ellps=GRS80 +datum=NAD83" #EPSG: 4269
         END
         INCLUDE "map-ROADS.inc"
     END

# map-ROADS.inc

# S1100,    20533, primary
# S1200,   325140, secondary
# S1400, 16320345, local
# S1500,   374859, 4wd trail
# S1630,   176149, ramp
# S1640,   176415, service along highway
# S1710,    17033, walkway
# S1720,      241, stairway
# S1730,    72743, alley
# S1740,  2255679, private
# S1750,   434084, census use
# S1780,    10645, parking lot
# S1820,     2893, bike path
# S1830,       12, bridle path

   MAXSCALEDENOM 500000
   CLASSITEM "RTTYP"
   LABELITEM "FULLNAME"
   SIZEUNITS METERS
   CLASS # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< this is drawn <<<<<<<<<
     EXPRESSION /^[USC]/
     STYLE
       COLOR "#FFFB89"
       WIDTH 18
       OUTLINECOLOR "#ECD390"
       OUTLINEWIDTH 4 ## make it big to verify this class is drawn ######
     END
     LABEL
       EXPRESSION ('[RTTYP]' = 'U' && '[RTENUM]' ~ '.')
       TEXT '[RTENUM]'
       STYLE
         SYMBOL "U"
         SIZE 20
         MINSIZE 20
         MAXSIZE 20
       END
       SIZE TINY
       POSITION CC
       #OFFSET 1 0
       MINDISTANCE 100
       REPEATDISTANCE 100
       COLOR "#000000"
       PARTIALS FALSE
       PRIORITY 6
     END
     LABEL
       MAXSCALEDENOM 300000
       EXPRESSION ('[RTTYP]' = 'S' && '[RTENUM]' ~ '.')
       TEXT '[RTENUM]'
       STYLE
         SYMBOL "S"
         SIZE 20
         MINSIZE 20
         MAXSIZE 20
       END
       SIZE TINY
       POSITION CC
       MINDISTANCE 100
       REPEATDISTANCE 100
       COLOR "#000000"
       PARTIALS FALSE
       PRIORITY 5
     END
     LABEL
       MAXSCALEDENOM 200000
       TYPE TRUETYPE
       FONT "arial"
       SIZE 16
       MAXSIZE 10
       MINSIZE 8
       COLOR "#816C34"
       OUTLINECOLOR "#FFFB89"
       PARTIALS FALSE
       MINDISTANCE 250
       MINFEATURESIZE 10
       BUFFER 4
       ANGLE FOLLOW
       PRIORITY 7
     END
   END
   CLASS
     MINSCALEDENOM 30000
     EXPRESSION ('[MTFCC]' = 'S1400')
     STYLE
       COLOR "#c1c1a1"
       WIDTH 6
       MINWIDTH 0.5
     END
   END
   CLASS  ## <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< this is draw <<<<<<<<<<<<<<<<
     MAXSCALEDENOM 30000
     EXPRESSION ('[MTFCC]' = 'S1400')
     # tried this expression also and it does not filter it out
     #EXPRESSION ('[MTFCC]' = 'S1400' && ! '[RTTYP]' ~ '^[USC]')
     STYLE
       #COLOR "#FFFFFF"
       COLOR "#FF0000"  ## make it RED to verify this is also drawn #####
       WIDTH 18
       #MINWIDTH 10
       MAXWIDTH 10
       OUTLINECOLOR "#D8D4C8"
       OUTLINEWIDTH 1.0
     END
     LABEL
       MAXSCALEDENOM 20000
       TYPE TRUETYPE
       FONT "arial"
       SIZE 18
       MAXSIZE 10
       MINSIZE 8
       COLOR "#645C58"
       OUTLINECOLOR "#FFFFFF"
       PARTIALS FALSE
       MINDISTANCE 250
       MINFEATURESIZE 10
       BUFFER 4
       ANGLE FOLLOW
       PRIORITY 7
     END
   END


More information about the mapserver-dev mailing list