Selon Ivan <[email protected]>:

The Java API only uses ByteBuffer. But you can use the asDoubleBuffer(),
asFloatBuffer(), asIntBuffer() or asShortBuffer() methods to create views of the
byte buffer as double, float, int or short buffer.

For example :

ByteBuffer byteBuffer = ByteBuffer.allocateDirect(8 * buf_xsize * buf_ysize);
band.ReadRaster_Direct(0, 0, xsize, ysize, buf_xsize, buf_ysize,
gdal.GDT_Float64, byteBuffer);
DoubleBuffer doubleBuffer = byteBuffer.asDoubleBuffer();

> Hi,
>
> Does anybody know how to write a FloatBuffer, IntBuffer or ShotBuffer using
> the Java API?
>
> Thanks,
>
> Ivan
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to