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

Stefan St.Mietke at gmx.de
Fri Jan 11 12:06:34 EST 2008


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.
I also changed the input raster, that I process. The input raster is now signed integer. With a input raster unsigned byte it doesn't work at all.


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

> >-----Original Message-----
> >From: St.Mietke at gmx.de
> >
> >I need a signed integer coverage.
> http://java.sun.com/j2se/1.5.0/docs/api/java/nio/ByteBuffer.html
> 
> Use ByteBuffer's putInt(int value)
> - or -
> Use ByteBuffer's asIntBuffer() and then IntBuffer's put(int i)
> 
> Either way, use ByteBuffer.allocateDirect(int capacity) to initially
> create the Buffer.
> --
> Ben

-- 
Institute for Cartography
TU Dresden

Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger?did=10


More information about the gdal-dev mailing list