I know this topic has been touched many times, but browsing all those
email, I couldn't find a solution to my problem.
I have a gridcoverage and want to write it to disk as a floating point
values tiff, let's say an temperature map.
So I go like:
GridCoverage2D geoCoverage = coverage2D.view(ViewType.GEOPHYSICS);
RenderedImage renderedImage = geoCoverage.getRenderedImage();
File tmpTiff = File.createTempFile("jgrass_", ".tiff");
GeoTiffWriter writer = new GeoTiffWriter(tmpTiff);
writer.write(geoCoverage, null);
The result I get is a transparent tiff, which seems to hold some data.
The thing that now makes me wonder is that even if the coverage
contains a floating point reference:
...sampleModel=ComponentSampleModelJAI: dataType=5 numBands=1
width=322 height=298 bandOffsets=[ 0 ]
colorModel=FloatDoubleColorModel: ColorModel: #pixelBits = 64
when I do a gdalinfo on the created tiff, I see at the end:
"Band 1 Block=322x8 Type=Int32, ColorInterp=Gray
Computed Min/Max=0.000,19.000"
The type is Int32.
what do I have to do to get it writing my temperatures in floating point?
Thanks for any hint,
Andrea
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users