It is a known bug in imageio tiff support see
https://jai-imageio-core.dev.java.net/issues/show_bug.cgi?id=180.
It's been fixed in imageio-ext, we should be able to include the fix
in the next release of geotools.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - 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://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------



On Mon, Feb 2, 2009 at 2:04 PM, andrea antonello
<[email protected]> wrote:
> 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
>

------------------------------------------------------------------------------
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

Reply via email to