Opened 12 years ago
Last modified 12 years ago
#4270 new defect
Line drawn by multiple classes
Reported by: | woodbri | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 6.2 release |
Component: | MapServer C Library | Version: | svn-trunk (development) |
Severity: | major | Keywords: | |
Cc: |
Description
I think I have found a weird bug where objects are getting rendered by multiple classes in a layer, which is counter to my understanding of how this should work. So bug in trunk and regression from prior versions.
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 to simplify this issue down to two classes. In the mapfile fragment below I have marked the two classes that 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.
It looks like in the full mapfile this is getting rendered via 3 separate classes. I stripped the other classes to simplify the example but here is an image showing all three:
http://imaptools.com:8080/dl/drawn-by-multple-classes.png
The red, the yellow and the orange are each separate classes in this layer.
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
The mapfile fragment is getting rendered at 27K Scale whan the two classes marked above are getting rendered.