Opened 15 years ago

Last modified 14 years ago

#3042 closed defect

WMS Driver Clobbers Transparency — at Version 1

Reported by: joelodom Owned by: warmerdam
Priority: normal Milestone: 1.7.0
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: WMS transparency
Cc: nowakpl

Description (last modified by warmerdam)

The WMS driver is apparently reformatting raster data and loosing alpha information in the process. Here is a WMS service description:

<GDAL_WMS>
  <Service name="WMS">
    <ServerURL>http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n1p.cgi?TRANSPARENT=TRUE</ServerURL>
    <ImageFormat>image/png</ImageFormat>
    <Layers>nexrad-n1p</Layers>
  </Service>
  <DataWindow>
    <UpperLeftX>-102.017258</UpperLeftX>
    <UpperLeftY>47.974853</UpperLeftY>
    <LowerRightX>-93.570578</LowerRightX>
    <LowerRightY>42.602123</LowerRightY>
    <SizeX>948</SizeX>
    <SizeY>603</SizeY>
  </DataWindow>
  <Timeout>45</Timeout>
</GDAL_WMS>

GDAL returns the raster as a 3 band PNG. If I put the following URL in my browser and load the PNG file with GDALOpen, I get a single band raster with a 4 byte color table.

http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n1p.cgi?TRANSPARENT=TRUE&request=GetMap&version=1.1.0&layers=nexrad-n1p&styles=&srs=EPSG:4326&format=image/png&width=948&height=603&bbox=-106.24059800,39.92912300,-97.79391800,45.30185300

Change History (1)

comment:1 by warmerdam, 15 years ago

Cc: nowakpl added
Description: modified (diff)
Note: See TracTickets for help on using tickets.