[Mapserver-users] transparent background raster (tif)

Rosangela Silva rosangela.silva at zenitpolar.com.br
Tue May 27 13:02:39 EDT 2003


Dear Christina,
Thanks for your help.
I try to do it but everything became transparent,
how can I do only background transparent??
Thanks
Rosângela

My layer definition is:
LAYER
  NAME "sp250"
  TILEINDEX "teste/sp250.shp"
  TILEITEM "IMAGE"
  STATUS DEFAULT
  TYPE RASTER
  #OFFSITE 0
  CLASS
  EXPRESSION "1" #1 refers to the colour-index
     COLOR -1 -1 -1 #transparent
  END
#  MAXSCALE
#  MINSCALE
END

----- Original Message ----- 
From: "Christina Biakowski (CCGIS)" <christina.biakowski at ccgis.de>
To: "Mapserver-Users at Lists. Gis. Umn. Edu"
<mapserver-users at lists.gis.umn.edu>; "Rosangela Silva"
<rosangela.silva at zenitpolar.com.br>
Sent: Tuesday, May 27, 2003 3:59 AM
Subject: AW: [Mapserver-users] transparent background raster (tif)


> Hello,
> perhaps you have already tried this: I think you have to find out the
> colour-index of your background-color and set it to transparent,
> either in the general layer section using the parameter OUTPUT with the
> index of your background-color like e.g.
>
> LAYER
>  NAME DGK1
>  TYPE RASTER
>  DATA "520911.tif"
>  STATUS ON
>  OFFSITE 0 #0 refers to the colour-index that has to be displayed
> transparent
> ...
>
> or defining an explicit class. For Rasters the classitem must be set to
> VALUE.
>
> LAYER
> ...
> CLASSITEM "VALUE"
> ...
> CLASS
> EXPRESSION "1" #1 refers to the colour-index
>   COLOR -1 -1 -1 #transparent
> END
> ...
> The colour-index you could for example find out by using the ArcGis
> Layer-Properties.
> The described way works with Mapserver 3.6x, but I remember to have read
> that in 3.7 it is implemented in a different way.
> I hope this helps!
>
> Best regards, Christina
>
>
> -----Ursprüngliche Nachricht-----
> Von: mapserver-users-admin at lists.gis.umn.edu
> [mailto:mapserver-users-admin at lists.gis.umn.edu]Im Auftrag von Rosangela
> Silva
> Gesendet: Montag, 26. Mai 2003 16:44
> An: mapserver-users at lists.gis.umn.edu
> Betreff: Re: [Mapserver-users] transparent background raster (tif)
>
>
> I could not send the files (large size) but
> I'm sending an example in mapserver to you understand
> better the problem.
> Thanks
> Rosângela
>
>
> > Hello,
> >
> > I'm having a problem to show some images that have a black background.
> > I need to see them with transparent background, is it possible in
> Mapserver?
> > They are in tiff format. I generate a tiff with transparent background,
> that
> > can be seen using ArcGis, for example, (please, look the examples
> attached).
> > I'm using tile index for display this images. But is there some property
> > that can
> > be set to background be transparent??
> >
> >
> > Thansk
> > Rosângela
> >
> > _______________________________________________
> > Mapserver-users mailing list
> > Mapserver-users at lists.gis.umn.edu
> > http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> >
>
>




More information about the mapserver-users mailing list