[Gdal-dev] transparent Geotiff?

Ken Boss Ken.Boss at dnr.state.mn.us
Tue May 31 14:44:56 EDT 2005


>>Bart--
>>
>>If your goal is simply to set background to transparent in mapserver apps, you should be able to use the OFFSITE parameter in your layer definition to accomplish that - no conversion necessary.  Eg:,
>>
>>  LAYER
>>    NAME shr30im3
>>    STATUS OFF
>>    DATA "data/gen/state/mn/shdr_clrim3.tif"
>>    TYPE RASTER
>>    OFFSITE 255 255 255
>>  END # shaded relief
>>
>>HTH,
>>
>>--Ken
>>
>>>> "Luis W. Sevilla" <sevilla_lui at gva.es> 05/30/05 5:58 AM >>>
>We've tryed to configure a mapserver serving WCS layers, but is seems to 
>ignore that OFFSITE parameter
>it's there anything more to do ?
>
>    thanks in advance
>-- 
>  Luis W. Sevilla

Luis--

I haven't done WCS myself.  I do know that in WMS contexts, you can effectively allow layers to "show through" OFFSITE in an overlain image, like:

  LAYER
    NAME landsat_img
    STATUS default
    DATA images/landsat/mosaic_img/state.img
    TYPE RASTER
    PROJECTION
      "init=epsg:26915"
    END
  END # landsat thematic mapper mosaic

  LAYER
    NAME color_ir
    STATUS default
    TILEINDEX images/ra_qq_test/tiles.shp
    TILEITEM "LOCATION"
    TYPE raster
    OFFSITE 0 0 0
    PROJECTION
      "init=epsg:26915"
    END
  END

where the landsat_img layer is drawn first and shows through any offsite areas in the color_ir layer.

If you had a bunch of tiff images with unwanted offsite, and you wanted to display those as a single layer, you could set it up much like the color_ir layer above and it should work.

That said, if what you're after is an image retrieved from WMS sources with transparent offsite, I think you may be out of luck.  AFAIK, there is no provision for that sort of thing, though I could be wrong.

--Ken




More information about the Gdal-dev mailing list