[mapserver-users] MapServer + SLD + transparency
Oscar Gomez
ogomez2 at gmail.com
Tue Jun 3 23:43:04 PDT 2008
Hi Assefa,
I have tried with a .map file, and the same symbol, and it works. But it
doesn't work with the SLD. My goal is trying to make it work with the SLD.
The picture is:
http://www.mirame.chduero.es/DMADuero_09_Viewer/img/sld/dam.gif
I'm also using pictures for filling polygons, for example:
http://www.mirame.chduero.es/DMADuero_09_Viewer/img/sld/hatch45_palegreen.gif
The SLD is:
http://www.mirame.chduero.es/DMADuero_09_Viewer/wise.xml
The URL to the capabilities is:
http://www.mirame.chduero.es/duerowfd?SERVICE=WFS&request=GetCapabilities&version=1.1.1
Only the layers that are not using ExternalGraphic in the SLD will show
transparent background. What is more, layers like "Regadios", that do
not use pictures, but have a complex symbology, also don't show a
transparent background.
Please find attached some KMLs that show this behaviour:
rios.kml : simple symbology, lines, no problem with transparency
mapa_lito.kml : complex polygon valuemaprenderer, homogeneous
representation, no problem with transparency
regadios.kml : polygon valuemparenderer, heterogeneous symbols, problems
with transparency
lics.kml : simple polygon symbol, fill based on a external image, problems
with transparency
presas.kml : scale dependent renderer:
- small scale: triangles, no problems with transparency
- big scale: picture based symbol, problems with transparency
Any idea on how to solve this?
Best Regards,
Oscar
On 6/3/08, Yewondwossen Assefa <yassefa at dmsolutions.ca> wrote:
>
> Hi There,
>
> Oscar Gomez wrote:
>
>> Hi all!
>> I'm having some trouble trying to use SLDs with MapServer.
>> I'm requesting maps from GoogleEarth using a NetworkLink object and a
>> custom KML-WMS-KML parser.
>> If I apply "simple" symbology through a custom SLD, it works, and the
>> background of the map created by MapServer is transparent, so only the
>> "vectors" are shown in GoogleEarth.
>> But if I use an SLD symbology using an external picture
>> (<ExternalGraphic> tag in SLD), then the background of the map created by
>> MapServer is not transparent anymore. Then Google Earth shows a map with
>> white background.
>>
>>
>
> ExternalGrapphic ends up being transformed into something like this in the
> map file:
>
> - inline symbol:
>
> SYMBOL
> NAME "
> http://www2.dmsolutions.ca/msapps/world_testdata/map/etc/target-1.gif"
> TYPE PIXMAP
> IMAGE "f:/msapps/world_testdata/map/484599a6_1a28_1.gif"
> GAP -20
> TRANSPARENT 0
> END
>
> and a class
>
> CLASS
> NAME "Unknown"
> STYLE
> ANGLE 360
> COLOR 255 0 0
> OPACITY 100
> SIZE 10
> SYMBOL "
> http://www2.dmsolutions.ca/msapps/world_testdata/map/etc/target-1.gif"
> END
>
>
> I am not sure I see the reason why this would affect the background
> transparency.
>
> If possible can you add the symbol manually in the mapfile and see if you
> get the same transparency problem.
>
> Do we have access to the external symbol you are using?
>
> I am using the following external symbol in my test (
> http://www2.dmsolutions.ca/msapps/world_testdata/map/etc/target-1.gif) and
> I have tried used both agg and gd as a rendering settings and I did not see
> any effects on the background transparency. Note that I am using Mapserver
> from svn.
>
>
> Best Regards,
>
> Has anyone experienced the same? Can this be solved?
>> Thanks in advance,
>> Oscar
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
>
> --
> ----------------------------------------------------------------
> Assefa Yewondwossen
> Software Analyst
>
> Email: assefa at dmsolutions.ca
> http://www.dmsolutions.ca/
>
> Phone: (613) 565-5056 (ext 14)
> Fax: (613) 565-0925
> ----------------------------------------------------------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080604/cf384349/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regadios.kml
Type: application/vnd.google-earth.kml+xml
Size: 1729 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080604/cf384349/attachment.kml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mapa_lito.kml
Type: application/vnd.google-earth.kml+xml
Size: 1744 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080604/cf384349/attachment-0001.kml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lics.kml
Type: application/vnd.google-earth.kml+xml
Size: 1725 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080604/cf384349/attachment-0002.kml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rios.kml
Type: application/vnd.google-earth.kml+xml
Size: 1783 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080604/cf384349/attachment-0003.kml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: presas.kml
Type: application/vnd.google-earth.kml+xml
Size: 1646 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080604/cf384349/attachment-0004.kml>
More information about the MapServer-users
mailing list