[mapserver-users] Re: Transparency via WMS request?

Roger André randre at gmail.com
Wed Sep 24 18:36:15 EDT 2008


Thanks to some help from a fellow GIS developer, I think I've narrowed the
problem down to the OUTPUTFORMAT section of my mapfile.  Changing from the
AGG to GD driver seemed to take care of the problem.  Will need to do some
additional futzing to see if I can get it working with AGG.
--



On Wed, Sep 24, 2008 at 1:38 PM, Roger André <randre at gmail.com> wrote:

> Ok, this is driving me bonkers.  I have a raster image with nodata values
> set to be transparent.  When I make requests to this layer in "mode=map", it
> works beautifully, and the nodata values are transparent.
>
> -
> http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/temp/temp.map&mode=map
>
> However, when I try to view the same data via a WMS request, the nodata
> values are displayed in black.
>
> - http://localhost/cgi-bin/mapserv?map=/var/www/mapfiles/temp/temp.map
> &SERVICE=WMS
> &version=%221.1.122
> &REQUEST=GetMap
> &LAYERS=imagery
> &STYLES=
> &BBOX=-180,-90,180,90
> &WIDTH=600
> &HEIGHT=500
> &FORMAT=png
> &SRS=epsg:4326
>
> I have tried doing a couple of things to fix this, none of which has
> worked:
> - added "wms_transparent"     "TRUE" to METADATA section of LAYER
> - added "&TRANSPARENT=TRUE" to the end of the WMS request
> - made sure that in OUTPUTFORMAT I have all of these:
>   OUTPUTFORMAT
>    NAME png
>    DRIVER "AGG/PNG"
>    MIMETYPE "image/png"
>    IMAGEMODE RGBA
>    EXTENSION "png"
>    FORMATOPTION "TRANSPARENT=ON"
>    FORMATOPTION "INTERLACE=OFF"
>    TRANSPARENT ON
>   END #end outputformat
>
> Please, can anyone tell me what I'm missing?
>
> Thanks,
>
> Roger
> --
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080924/0c76562a/attachment.html


More information about the mapserver-users mailing list