From: Simone G. <sim...@gm...> - 2008-05-26 15:07:26
|
Ciao Matt, if you could provide a test case which is as isolated as possible (with sampe data as well) I could try to reproduce this issue and fix it asap. Simone. On Thu, May 22, 2008 at 4:57 PM, Matt Foster <Mat...@no...> wrote: > Hi Simone...see my responses below. > > Ciao Matt, > please read below... > > On Fri, May 16, 2008 at 10:02 PM, Matt Foster <Mat...@no...> > wrote: > > > OK...I found RasterSymbolizerHelper (and some helpful example code on the GT > website!), and I'm getting a color GeoTiff now. However, it appears that > the opacity information from my SLD does not get applied to the GeoTiff. > The entire image has an opacity of 1.0, but I have part of the color map > with opacity 0. > > > The RasterSymbolizer does not handle himself the opacity for the > output coverage but it leaves that to the GridCoveageRenderer in order > to prevent the creation of an intermediate image. > I am realizing that it would probably be better to control this > behaviour throuh a Hint so that we can use the RasterSymbolizer more > in a standalone way. > > However, from your words it seems that your problem is related to > applying a colormap with transparency not to the transparency of the > whole image. Am I right? > > > You are correct. I am assigning a color of black with an opacity of 0 to > the areas in the data where there is nothing useful to see. This works > perfectly when I create a PNG image via GridCoverageRenderer, but not in the > Geotiff. I've made use of some code from this page; in particular the > section "Symbolizing Sea Bottom Data". The Geotiff gets the color ramps > nicely, but the opacity seems to just get ignored. > > > > > Also, it appears that the CRS that I have applied to the > GridCoverage (WGS84) does not make it into the GeoTiff correctly. I have > checked it with both gdalinfo and ArcMap, and neither indicate that the > GeoTiff is WGS84. > > > > I definitely need an isolated test case to check what you are trying > to do and to see if you ran into a bug. > I can provide an ftp address where you can also put some test data. > Is that feasible? > > > That might be a challenge. The data I'm starting with is very non-standard > NetCDF. I pull the raw float values out using the NetCDF-java package and > create my GridCoverage2D object using the float[][] array. I'm thinking the > only way to do this might be to provide both the data and my code, which > might be embarrassing to me, but I'm willing to try anything you think might > help. > > I can tell you that I've retrieved the CoordinateReferenceSystem object from > my GridCoverage, and toWKT() indicates that the CRS is set correctly on the > GridCoverage. > > Matt > > > Simone. > > > > > Have a good weekend! > > Matt > > > Matt Foster wrote: > > Hello Simone, > > I think I see how to do that using > RasterSymbolizerSupport.recolorCoverage(), however, RasterSymbolizerSupport > seems to be missing in 2.5M2. It's in the online javadoc, but it is neither > in my 2.5M2 jars, nor in the 2.5M2 javadoc I downloaded. Do you know why > this is? Should I be using something besides RasterSymbolizerSupport? > > Matt > > > Simone Giannecchini wrote: > > Ciao Matt, > steps below... > > -apply the rastersymb (you should be able to do so :-) ) > -create a geotiff writer for a file > -do a write supplying your grdicoverage to the geotiff writer. > > Simone.- > > On Fri, May 16, 2008 at 2:56 PM, Matt Foster <Mat...@no...> > wrote: > > > If I have a GridCoverage2D and a RasterSymbolizer (with ColorMap) is there > an easy way I can get a color GeoTIFF? I'm using 2.5M2. > > Thanks for any input. > > Matt > > -- > The cosmos is all that is or ever was or ever will be. > -- Carl Sagan > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > > > > > > -- > The cosmos is all that is or ever was or ever will be. > -- Carl Sagan > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > ________________________________ > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > > -- > The cosmos is all that is or ever was or ever will be. > -- Carl Sagan > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > > > > > > -- > The cosmos is all that is or ever was or ever will be. > -- Carl Sagan > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Geotools-gt2-users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > -- ------------------------------------------------------- Eng. Simone Giannecchini President /CEO GeoSolutions S.A.S. Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 mob: +39 333 8128928 http://www.geo-solutions.it ------------------------------------------------------- |