Ciao Milton, please read below... ------------------------------------------------------- Ing. Simone Giannecchini GeoSolutions S.A.S. Founder - Software Engineer Via Carignoni 51 55041 Camaiore (LU) Italy
phone: +39 0584983027 fax: +39 0584983027 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://simboss.blogspot.com/ http://www.linkedin.com/in/simonegiannecchini ------------------------------------------------------- On Thu, Dec 3, 2009 at 2:51 PM, Milton Jonathan <mil...@tecgraf.puc-rio.br> wrote: > Hello > > This is probably a stupid question but.. how does one set a > "transparency color" for a RasterSymbolizer? What I mean is to define a > specific color to be transparent (as we do in everyday image editing > tools), so that the background of rotated satellite images doesn't show > on the map. RasterSymbolizer is not really meant to do that. It is supposed to linearly interpolate values into colors. I have slightly changed this in the GeoTools implementation, see these docs for referece: http://geoserver.org/display/GEOSDOC/RasterSymbolizer http://docs.codehaus.org/display/GEOTOOLS/Raster+Symbolizer+support Something similar to what you need can be done with the ImageMosaic input transparent color, notice that that works for RGB like images though. However the best things IMHO would be to develop a simple JAI operation that can be used to recognize the black collars and then use the concept of ROI to move them around. I am saying this since, let's assume that you have a grayscale raster, 16 bits unsigned (popular in remote sensing) where the collar is pure black (0 intensity) it is ok to say black --> transparent; however in an orthphoto, usually RGB, you can still have black holes sometimes, however, if you do black --> transparent you might be washing out part of your image that are of interest. In this case, a collar approach would be much better. > > The important thing here is that the raster may have more than 1 band or > channel (e.g., 3 RGB bands, or n bands with a ChannelSelection to choose > which ones will be represented as RGB). For images with a single gray > channel, it looks as if I could achieve this result by setting an > opacity value for a specific entry in a ColorMap. However, how do I > specify a ColorMapEntry whose quantity is a combination of the 3 bands? > (e.g., yellow should be transparent) You can try to use the ImageMosaic. Easiest thing is to put your data in a dir and point the mosaic plugin to that dir so that it will index it and create a reader for you. Simone > > Thanks > Milton > > -- > > Milton Jonathan > Grupo GIS e Meio Ambiente > Tecgraf/PUC-Rio > Tel: +55-21-3527-2502 > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Geotools-gt2-users mailing list > Geotools-gt2-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users