[mapserver-users] grayscale images using classgroups

Martin Kofahl M.Kofahl at gmx.net
Mon Dec 1 00:26:32 EST 2008


I found a formula RGB2grayscale = 0.299R + 0.587G + 0.114B and would like to apply this on a class section in order to use the STYLE-parameter for serving a raster layer colored or generic grayscaled. Due to processing instructions work on layer level only, they do not help in this case. I'm looking for a solution like this:

  CLASS
    CLASSGROUP 'grayscale'
    STYLE
      COLOR [grayscale] [grayscale] [grayscale]
    END
  END

  CLASS
    CLASSGROUP 'color'
    STYLE
      COLOR [red] [green] [blue]
    END
  END


-------- Original-Nachricht --------
> Datum: Wed, 26 Nov 2008 09:26:04 -0500
> Von: Yewondwossen Assefa <yassefa at dmsolutions.ca>
> An: Martin Kofahl <M.Kofahl at gmx.net>
> Betreff: Re: [mapserver-users] grayscale images using classgroups

> Martin,
> 
>    Are you talking of non-8 bits rasters? Looking into the doc I think 
> all the processing directives described there that allows 
> classifications on a non 8bit rasters apply at the layer level.
> (http://mapserver.gis.umn.edu/docs/howto/raster_data/#special-processing-directives)
> 
> 
> Best Regards
> 
> Martin Kofahl wrote:
> > Hi,
> > is there an option in the class section of the map file (so it can use
> the style parameter) making the output grayscaled?
> > 
> > Martin
> > _______________________________________________
> > mapserver-users mailing list
> > mapserver-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapserver-users
> > 
> 
> 
> -- 
> ----------------------------------------------------------------
> Assefa Yewondwossen
> Software Analyst
> 
> Email: assefa at dmsolutions.ca
> http://www.dmsolutions.ca/
> 
> Phone: (613) 565-5056 (ext 14)
> Fax:   (613) 565-0925
> ----------------------------------------------------------------


More information about the mapserver-users mailing list