Opened 12 years ago
#4244 new enhancement
Need fine grain units support for styles and labels
Reported by: | woodbri | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MapServer C Library | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: |
Description
This is a spin out of a discussion in #4239
In general we need finer grain support for units. Specifying UNITS METERS at the LAYER level causes problem with because some objects need to be scaled like the width of roadways, but if you have a hwy shield that is a white circle with a black outline the should not get scaled.
The problem can be seen here:
LAYER NAME "roads" TYPE LINE TILEINDEX "tidx-ROADS" MAXSCALEDENOM 500000 CLASSITEM "RTTYP" LABELITEM "FULLNAME" SIZEUNITS METERS CLASS EXPRESSION /^[USC]/ STYLE COLOR "#FFFB89" WIDTH 18 OUTLINECOLOR "#ECD390" OUTLINEWIDTH 1 END LABEL MAXSCALEDENOM 200000 EXPRESSION ('[RTTYP]' = 'S' && '[RTENUM]' ~ '.') TEXT '[RTENUM]' STYLE #GEOMTRANSFORM 'labelpnt' SYMBOL "circle-filled" COLOR "#FFFFFF" OUTLINECOLOR "#000000" # OUTLINEWIDTH 1 ##### problem is outlinewidth scaling MINSIZE 19 MAXSIZE 19 END # STYLE # SYMBOL "circle" # COLOR "#000000" # MINSIZE 19 # MAXSIZE 19 # END SIZE TINY POSITION CC MINDISTANCE 100 COLOR "#000000" PARTIALS FALSE PRIORITY 7 END END }} I ended having to convert the symbol into a pixmap image symbol. tbonfort suggested a format like: {{{ STYLE WIDTH 5 meters OFFSET 2 pixels END }}} I have no idea how supportable this would be through out the various rendering engines, but my guess is that if we define the object characteristics that the rendering code can then transform the intent into appropriate actions in the engine.
Note:
See TracTickets
for help on using tickets.