How do I not render the white background when displing NEXRAD from a WMS

Brent Wood pcreso at PCRESO.COM
Sat Mar 3 13:25:58 EST 2007


--- Andrew Parker <aparker1969 at YAHOO.COM> wrote:

> Ok.  I give up.  How do I NOT render the white background?  I just want the
> base reflectivity to show.  I am accessing a base reflectivity layer from a
> WMS located at:
> 
> "http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?"

See transparency & offsite options for the layer definition:
http://mapserver.gis.umn.edu/docs/reference/mapfile/layer

TRANSPARENCY 0
OFFSITE 255 255 255

I've only used it in my WMS server to provide layers with the white background
removed. I'm assuming it will work in a client as well. Also ensure you are not
using JPG images (I see you are using PNG24, but it is worth mentioning anyway
:-), as they don't support transparency & can finish up with off-white pixels
for white in the lossy compression.


Cheers,


  Brent Wood

> 
> My test site is available for viewing at: 
> "http://mapserver.rthicksconsult.com"
> 
> There are two test sites.  1) the form button "Click Here..."; my first map.
>                                      2) Link: Test1;  my first Chamelon map.
> 
> Both have the NexRad Layer as shown below in the partial mapfile.
> 
> Thanks in advance.
> 
> Andrew.
> 
> #
> # Start of map file
> #
> # Sample map file for a chameleon app.
> #
> NAME DEMO
> STATUS ON
> SIZE 400 300
> SYMBOLSET ../etc/symbols.sym
> EXTENT -109.1 31.26 -102.89 37.09
> UNITS DD
> PROJECTION
>   "init=epsg:4326"
> END
> SHAPEPATH "../data"
> IMAGECOLOR 25 25 112
> FONTSET ../etc/fonts.txt
> TRANSPARENT TRUE
> # IMAGETYPE - set to PNG24 in /congif/chameleon.xml
> 
> ...
> ...
> ...
> 
> # ******************** NexRad********************
> LAYER
>   NAME "Nexrad"
>   STATUS ON
>   TYPE RASTER
>   CONNECTIONTYPE WMS
>   CONNECTION "http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi?"
>   PROJECTION
>     "init=epsg:4326"
>   END
>   METADATA
>     "wms_name" "nexrad-n0r"
>     "wms_server_version" "1.1.1"
>     "wms_srs" "EPSG:4326"
>     "wms_format" "image/jpeg"
>     "wms_title" "NEXRAD BASE REFLECT"
>   END
> END
> 
> END # end of mapfile
> 



More information about the mapserver-users mailing list