.. also, the WMS spec has some things to say about combinations of the FORMAT-, 
BGCOLOR- and TRANSPARENT-parameters, which always seem to surprise me, and I 
always need to look up when I need it.

Regards,
/julian
________________________________________
Fra: Rahkonen Jukka (MML) [[email protected]]
Sendt: 30. november 2015 09:58
Til: [email protected]; [email protected]
Emne: Re: [Geoserver-users] How to get TRANSPARENT PNG image from GeoServer?

Hi,

Works for me with Geoserver 2.8 and these requests:

Transparent with this gdalinfo report
Band 1 Block=768x1 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
Band 2 Block=768x1 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
Band 3 Block=768x1 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
Band 4 Block=768x1 Type=Byte, ColorInterp=Alpha

http://localhost:8080/geoserver/sf/wms?service=WMS&version=1.1.0&request=GetMap&layers=sf:roads&styles=&bbox=589434.8564686741,4914006.337837095,609527.2102150217,4928063.398014731&width=768&height=537&srs=EPSG:26713&format=image/png&transparent=true
Non-transparent with gdalinfo report
Band 1 Block=768x1 Type=Byte, ColorInterp=Red
Band 2 Block=768x1 Type=Byte, ColorInterp=Green
Band 3 Block=768x1 Type=Byte, ColorInterp=Blue

http://localhost:8080/geoserver/sf/wms?service=WMS&version=1.1.0&request=GetMap&layers=sf:roads&styles=&bbox=589434.8564686741,4914006.337837095,609527.2102150217,4928063.398014731&width=768&height=537&srs=EPSG:26713&format=image/png
This setting makes the map transparent from where there are no vector features. 
I wonder if your problems is that your polygons are covering the labels from 
the other layer? Then you must change the rendering order.

-Jukka Rahkonen-

KhunSanAung wrote:

Hi All,

I'm using WMS Request to get PNG images from GeoServer.
I'm fusing two different PNG layers (One for Features & One for Labels) outside 
of GeoServer.

I found that both of my PNG files are not transparent for overlaying each other.

I've added &TRANSPARENT=TRUE
But it doesn't work as I supposed.

Can anybody help me How can I make WMS request to GeoServer to get TRANSPARENT 
Image?

Thank you very much in advanced.
---
sample WMS Request is as below.
-----
http://localhost:8080/geoserver/Myanmar/wms?LAYERS=Myanmar%3Atownship_area&STYLES=&FORMAT=image%2Fpng&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A32647&BBOX=40547.642456059,1791371.3200072,276491.62298584,2318896.7262572&WIDTH=229&HEIGHT=512

--
Have a nice day!
--

Mr. Khun San Aung


------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to