Thanks Simone. Switching to CRS.decode() from DefaultGeographicCRS
fixed it. All of my other clients acquire the CRS correctly now. Matt Simone Giannecchini wrote: Ciao Matt, thanks for the effort, I am already looking it into this issue.First suggestion though, use CRS.decode("EPSG:4326") instead of DefaultGeographicCRS.WGS84, this makes easier interoperability with other software. More suggestion will follow :-) Simone. On Wed, May 28, 2008 at 7:58 PM, Matt Foster <[EMAIL PROTECTED]> wrote:Hi Simone, I got a test case put together. I wrote the data out to a binary file using DataOutputStream, which should be fully portable and it compressed nicely as well. I just zipped up my Netbeans project directory. If you don't use NB, I think you'll still find everything easily. I also included the SLD I'm trying to use to make part of the image transparent, so you could look at that too, if you'd like. One interesting note...I found that if I read the Geotiff back in with GeoTiffReader it will get the correct CRS. However, as I mentioned before, neither GDAL nor ESRI ArcMap report the CRS properly. Go to this URL... http://www.srh.noaa.gov/anonymous/OUN/ and get GeotiffTest.zip. That should contain everything. Let me know if you run into any trouble. Thank you again for your help! Matt Simone Giannecchini wrote: 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 <[EMAIL PROTECTED]> wrote: Hi Simone...see my responses below. Ciao Matt, please read below... On Fri, May 16, 2008 at 10:02 PM, Matt Foster <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 Geotools-gt2-users@lists.sourceforge.net 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 Geotools-gt2-users@lists.sourceforge.net 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 Geotools-gt2-users@lists.sourceforge.net 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users -- The cosmos is all that is or ever was or ever will be. -- Carl Sagan -- The cosmos is all that is or ever was or ever will be. -- Carl Sagan |
begin:vcard fn:Matt Foster - N0EYE n:Foster;Matt org:;NWS Forecast Office - Norman OK email;internet:[EMAIL PROTECTED] title:Information Technology Officer tel;work:(405) 325-3406 x-mozilla-html:TRUE version:2.1 end:vcard
------------------------------------------------------------------------- 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users