From: Gabriella T. <g....@ni...> - 2006-12-08 00:24:33
|
I am reading some georeferenced images (png, jpg) which when rendered I would like to have specific colors and transparency. How do I do this? Do I use ColorMap or do I use Category as explained in http://geotools.codehaus.org/Using+Grid+Coverage I've tried to use ColorMap but I cannot get it to do anything for me: URL imgURL = (new File("data/f50level.png")).toURL(); WorldImageReader wir = new WorldImageReader(imgURL); GridCoverage2D gc1 = (GridCoverage2D)wir.read(null); ColorMap cm1 = sb.createColorMap(new String[] {""}, new double[]{-1}, new Color[]{Color.blue}, ColorMap.TYPE_RAMP); RasterSymbolizer rs1 = sb.createRasterSymbolizer(cm1, 0.5); I want for these images to be transparent and a range of of a single color (typically blue). I am bit confused on how to proceed, or whether in the end it is even possible to do this. Thanx gaby -- *************************************************************** ** Gabriella Turek g....@ni... ** ** National Institute of Water & Atmospheric Research (NIWA) ** ** PO Box 8602 Christchurch New Zealand +64-3-348-8987x3724 ** *************************************************************** |