Ticket #1155 (closed enhancement: fixed)

Opened 4 years ago

Last modified 2 months ago

transparency at the STYLE level

Reported by: bartvde@osgis.nl Assigned to: sdlime
Priority: high Milestone: 5.2 release
Component: MapServer C Library Version: 4.4
Severity: minor Keywords:
Cc: sgillies@frii.com, 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

style-opacity.png (103.4 kB) - added by tbonfort on 03/23/08 05:50:18.
style level opacity rendering glitches on multi-style lineworks

Change History

01/03/05 19:18:49 changed by sgillies@frii.com

  • cc set to sgillies@frii.com.
No, transparency should be at the STYLE level, which is the closest to SLD's
Symbolizers.


01/04/05 13:47:41 changed by bartvde@osgis.nl

  • summary changed from transparency at the CLASS level to transparency at the STYLE level.
You're absolutely right Sean, I have changed the bug summary accordingly.

01/04/05 15:51:01 changed by sdlime

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

01/04/05 16:06:48 changed by bartvde@osgis.nl

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.

01/04/05 16:22:29 changed by sgillies@frii.com

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.

01/04/05 17:12:27 changed by assefa

  • cc changed from assefa@dmsolutions.ca to mapserver-bugs@dmsolutions.ca.
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 ?  

05/11/05 15:39:10 changed by bartvde@osgis.nl

  • milestone set to FUTURE.
Setting target to future.

03/23/08 05:49:16 changed by tbonfort

  • description changed.

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.

03/23/08 05:50:18 changed by tbonfort

  • attachment style-opacity.png added.

style level opacity rendering glitches on multi-style lineworks

03/24/08 10:44:39 changed by dmorissette

  • cc changed from sgillies@frii.com to sgillies@frii.com, dmorissette.
  • milestone changed from FUTURE to 5.2 release.

05/15/08 23:21:45 changed by sdlime

  • status changed from new to closed.
  • resolution set to fixed.

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