[mapserver-users] Re: Transparency via WMS request?
Nolte, Tim
Tim.Nolte at ipcswirelessinc.com
Thu Sep 25 06:51:55 PDT 2008
Something I notice is that you don't have any MIMETYPE for your OUTPUTFORMAT. If you want to use AGG and PNG with transparency I'd try adding:
MIMETYPE "image/png; mode=24bit"
to your OUTPUTFORMAT.
----
Timothy J Nolte - tnolte at ilpcs.com
Network Planning Engineer
iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512
Office: 616-656-5163
PCS: 616-706-2438
Fax: 616-554-6484
Web: www.ipcswirelessinc.com
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Roger André
Sent: Wednesday, September 24, 2008 6:56 PM
To: Robert Sanson
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Re: Transparency via WMS request?
Sorry, but I can't test that. I don't have pdf support compiled into this version of Mapserver.
I did get transparency to work using the AGG driver by altering my OUTPUTFORMAT to look like this:
OUTPUTFORMAT
NAME 'AGGA'
DRIVER AGG/PNG
IMAGEMODE RGBA
EXTENSION "png"
FORMATOPTION "TRANSPARENT=ON"
FORMATOPTION "INTERLACE=OFF"
TRANSPARENT ON
END #end outputformat
Unfortunately, it seemed to have decreased the quality of the rendering. I've switched back to using the GD driver, and that seems to give good quality and correct transparency.
OUTPUTFORMAT
NAME 'png'
DRIVER GD/PNG
IMAGEMODE RGBA
EXTENSION "png"
FORMATOPTION "TRANSPARENT=ON"
FORMATOPTION "INTERLACE=OFF"
TRANSPARENT ON
END #end outputformat
---
On Wed, Sep 24, 2008 at 3:39 PM, Robert Sanson <SansonR at asurequality.com> wrote:
Is it possible to get layer transparency when outputformat=PDF?
Thanks,
Robert Sanson
>>> "Roger André" <randre at gmail.com> 25/09/2008 10:36 a.m. >>>
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="1.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
--
Click here <https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==> to report this email as spam.
------------------------------------------------------------------
The contents of this email are confidential to AsureQuality. If you have received this communication in error please notify the sender immediately and delete the message and any attachments. The opinions expressed in this email are not necessarily those of AsureQuality. This message has been scanned for known viruses before delivery. AsureQuality supports the Unsolicited Electronic Messages Act 2007. If you do not wish to receive similar communications in future, please notify the sender of this message.
------------------------------------------------------------------
This message has been scanned for malware by SurfControl plc. www.surfcontrol.com <http://www.surfcontrol.com/>
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list