Opened 19 years ago

Closed 16 years ago

#1155 closed enhancement (fixed)

transparency at the STYLE level

Reported by: bartvde@… Owned by: sdlime
Priority: high Milestone: 5.2 release
Component: MapServer C Library Version: 4.4
Severity: minor Keywords:
Cc: sgillies@…, dmorissette

Description (last modified by tbonfort)

Until there is a support of transparency at feature level in Mapserver,
the SLD won't be able to support this feature.

Later,

Bart van den Eijnden wrote:
> Hi list,
>
> is it possible using Mapserver to have a transparent polygon fill through
> SLD?
>
> E.g.:
>
> <Fill>
>   <CssParameter name="fill">#ff0000</CssParameter>
>   <CssParameter name="fill-opacity">0.5</CssParameter>
> </Fill>
>
> If not, is there a work-around to accomplish this using SLD?
>
> Thanks in advance.
>
> Best regards,
> Bart
>

Attachments (1)

style-opacity.png (103.4 KB ) - added by tbonfort 16 years ago.
style level opacity rendering glitches on multi-style lineworks

Download all attachments as: .zip

Change History (11)

comment:1 by sgillies@…, 19 years ago

Cc: sgillies@… added
No, transparency should be at the STYLE level, which is the closest to SLD's
Symbolizers.


comment:2 by bartvde@…, 19 years ago

Summary: transparency at the CLASS leveltransparency at the STYLE level
You're absolutely right Sean, I have changed the bug summary accordingly.

comment:3 by sdlime, 19 years ago

Support at style level will likely be expensive, is it really necessary? Would 
feature level transparency be good enough? That is, moving transparency from 
msDrawMap to msDrawShape. Even then it may slow things down a good bit.

Steve

comment:4 by bartvde@…, 19 years ago

My purpose as a user would be to get a whole layer of polygons transparent using
SLD.

SLD specifies transparency at the Symbolizer level, so users could theoretically
request maps which have different transparency for different styles, but I think
this will rather be exception then rule.

Just my opinion though.

comment:5 by sgillies@…, 19 years ago

One place you might want transparency at CLASS level (or lower) is to have 
transparent polygons in one class and opaque polygons in another class, or 
to do a classification that has continuously varying transparency.

Also, now, if you want to have a polygon with a transparent fill and solid (100%
opaque boundary) you need two layers -- at double the cost.  With transparency 
in a style, you could have a solid stroke style and a transparent fill style.

I'm not sure which is faster/slower: two iterations over a layer for separate
stroke/fill opacity or a few extra statements within msDrawShape.

comment:6 by assefa, 19 years ago

Cc: mapserver-bugs@… added; assefa@… removed
To be exactly consistent with the SLD, we need to have the transparency at the
STYLE level as decribed by Sean's comments. 
 
 Steve : I understand the cost associated with doing tranceparency at style
level, but Is it correct to assume that if no transparency is set (which is the
general case), the user won't see any diffrence ?  If that is the case, those
who needs it should be prepared to pay the price for this feature.
 Steve : do you intend to keep the transparency at the layer level as well as
adding it at a class (or style) level ?  

comment:7 by bartvde@…, 19 years ago

Milestone: FUTURE
Setting target to future.

comment:8 by tbonfort, 16 years ago

Description: modified (diff)

AGG support for style level opacity has been added in r7476, for all symbol types *except* PIXMAP symbols.

known issue: rendering lineworks with multiple styles (eg to create outlined roads) will produce unwanted results (intersections appear at (more or less)twice the desired opacity, and the caching of the bottommost style is ineffective). see attached image for an example.

by tbonfort, 16 years ago

Attachment: style-opacity.png added

style level opacity rendering glitches on multi-style lineworks

comment:9 by dmorissette, 16 years ago

Cc: dmorissette added
Milestone: FUTURE5.2 release

comment:10 by sdlime, 16 years ago

Resolution: fixed
Status: newclosed

Thomas has addressed this in the AGG code for 5.2 so I'm going to close this in favor of tracking specific to that work should it be necessary.

Steve

Note: See TracTickets for help on using tickets.