[gdal-dev] GeoTiff writing with Java Bindings (signed data types)

Stefan Mietke St.Mietke at gmx.de
Sat Jan 12 10:56:29 EST 2008


Hi Ben,

it seems, that the getInt() / asIntBuffer().get() methods deliver false integer values. After reading my raster with the ReadRaster_Direct() method I get false pixel values. When I increment these false values, the output pixel value increases by 256. The values I don't manipulate, are fine after writing back to the geotiff file!
I als tried it with your code, and even there false values were displayed with the get() method. So there is no chance to manipulate these data with the writableRaster class.
But as I said, the code works with unsigned byte values, if they are already byte data.

Kind regards,
Stefan


-------- Original-Nachricht --------
> Datum: Fri, 11 Jan 2008 12:18:32 -0500
> Von: "Collins, Benjamin" <collinsb at mitre.org>
> An: "Stefan" <St.Mietke at gmx.de>
> CC: gdal-dev at lists.osgeo.org
> Betreff: RE: RE: [gdal-dev] GeoTiff writing with Java Bindings (signed data types)

> >-----Original Message-----
> >From: Stefan [mailto:St.Mietke at gmx.de] 
> >
> >I tried it with putInt(), but the problem is, that I only have 
> >a output value every 4th pixel, cause the putInt() method 
> >increments the position by four.
> 
> Stefan,
> 
> See gdal/swig/java/apps/GDALtest.java 
> 
> --
> Ben

-- 
Institute for Cartography
TU Dresden

GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail


More information about the gdal-dev mailing list