[MS4W-Users] WMS imagery has transparent pixels

Smith, Michael Michael.Smith at maine.gov
Mon Jan 25 13:54:44 EST 2010


Further followup for ESRI client users - there is a default setting in
the WMS layer properties to set a background color.  Default behavior of
ArcMap is to set that color to (guess what...) 255 255 255, and by
default to make that transparent.  Simple change in the layer properties
turns that off.

Thanks MS folks for your patience in what was an ESRI issue...


**********
Michael Smith
State GIS Manager
Maine Office of GIS
State House Station 174
264 Civic Center Drive
Augusta ME 04333-0174
(207) 215-5530

-----Original Message-----
From: ms4w-users-bounces at lists.maptools.org
[mailto:ms4w-users-bounces at lists.maptools.org] On Behalf Of Smith,
Michael
Sent: Monday, January 25, 2010 1:30 PM
To: ms4w-users at lists.maptools.org
Subject: Re: [MS4W-Users] WMS imagery has transparent pixels

 
Actually I discovered this is an issue specifically with ArcGIS clients.
Testing on QGIS, GE, and Gaia, and direct http request as below shows
the 255 255 255 to be white like it should be, not transparent.  Will
have to log this with ESRI, not MS folks.

We have since scaled the pixel values to 250 250 250 as a workaround.
Ugly solution but it works for now.

**********
Michael Smith
State GIS Manager
Maine Office of GIS
State House Station 174
264 Civic Center Drive
Augusta ME 04333-0174
(207) 215-5530

Did you solve the problem already? When I access your WMS, it has no
transparency anymore, with using png.
Even with parameter for wms Transparent=true it does not show
transparent pixels..


For testing I used this HTML, so you can easily see it works, because I
specified black background, transparent would be black, this is not the
case with these clouds:

<html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        </head>
        <body>
                <div
style="width:1015px;height:795px;background-color:black;" id="map"><img
src=
"http://mapservertest.maine.gov/wms/mapserv.exe?map=c:/wms/orthos.map&SE
RVICE=WMS&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-68.916164,45.94
0735,-68.866133,45.979912&SRS=EPSG:4326&WIDTH=1015&HEIGHT=795&LAYERS=Bax
ter_04%2CBaxter_04_5m%2CBaxter_04_25m&STYLES=%2C%2C&FORMAT=image/png&DPI
=96&TRANSPARENT=TRUE"/></div>
        </body>
</html>

Greets
Gerben

-----Oorspronkelijk bericht-----
Van: ms4w-users-bounces at lists.maptools.org
[mailto:ms4w-users-bounces at lists.maptools.org] Namens Smith, Michael
Verzonden: Thursday, January 21, 2010 8:43 PM
Aan: ms4w-users at lists.maptools.org
Onderwerp: Re: [MS4W-Users] WMS imagery has transparent pixels

Thanks Karsten,

But what I am trying to achieve is to have the 255 255 255 pixels NOT
transparent, they are already transparent and I need the opposite (they
are clouds in aerial photos and where they are totally white, there are
holes right through to whatever's underneath).

Also according to the MS documentation, TRANSPARENT will not work with
RGB (would need to use RGBA).  I did try that, with TRANSPARENT=OFF and
IMAGEMODE=RGBA, no change in behavior.

Regarding JPEG, we found initially that certain clients would not accept
JPEGs from WMS, and that is why we use PNG.  It seems the most widely
supported.

Other suggestions


**********
Michael Smith
State GIS Manager
Maine Office of GIS
State House Station 174
264 Civic Center Drive
Augusta ME 04333-0174
(207) 215-5530

-----Original Message-----
From: karsten vennemann [mailto:karsten at terragis.net]
Sent: Thursday, January 21, 2010 12:28 PM
To: ms4w-users at lists.maptools.org
Cc: Smith, Michael
Subject: RE: [MS4W-Users] WMS imagery has transparent pixels

Try setting  FORMATOPTION "TRANSPARENT=ON" in your outputformat
declaration and choose an image type that supports transparency like
png.
does
 OUTPUTFORMAT
   NAME "AGGPNG24"
   DRIVER "AGG/PNG"
   MIMETYPE "image/png"
   EXTENSION PNG
   IMAGEMODE RGB
   FORMATOPTION "INTERLACE=OFF"
   FORMATOPTION "TRANSPARENT=ON"
 END
work ?

Note: I had usually the opposite problem with vector layers and WMS when
I set color to 255 255 255 that as WMS renders then transparent. In that
acse with vectors and one can set color 254 254 254 instead and it will
render fine (white).

Karsten

Cheers
Karsten

Karsten Vennemann
Principal

Terra GIS LTD
Seattle, WA, USA
www.terragis.net



_______________________________________________
MS4W-Users mailing list
MS4W-Users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/ms4w-users

<< Please read our E-mail Disclaimer at: Emaildisclaimer.Grontmij.com >>
_______________________________________________
MS4W-Users mailing list
MS4W-Users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/ms4w-users
_______________________________________________
MS4W-Users mailing list
MS4W-Users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/ms4w-users


More information about the MS4W-Users mailing list