[gdal-dev] Interpretation of DTED elevation data

2012-03-28 Thread AlexRNL
to transform those values into a altitude in meters. According to the DTED format specification, the elevation values are supposed to be two-bytes integer in meters. But, when using the http://www.gdal.org/java/org/gdal/gdal/Band.html#ReadRaster_Direct(int, int, int, int, int, int, int

Re: [gdal-dev] Interpretation of DTED elevation data

2012-03-28 Thread Even Rouault
to retrieve the image data but I don't know to transform those values into a altitude in meters. According to the DTED format specification, the elevation values are supposed to be two-bytes integer in meters. But, when using the http://www.gdal.org/java/org/gdal/gdal/Band.html#ReadRaster_Direct

RE: [gdal-dev] Interpretation of DTED elevation data

2012-03-29 Thread Alex Barféty
in meters. But, when using the http://www.gdal.org/java/org/gdal/gdal/Band.html#ReadRaster_Direct(int , int, int, int, int, int, int, java.nio.ByteBuffer) ReadRaster_Direct method, the buffer retrieved is supposed to be composed of Int16 number but when i'm converting the raw data (bytes

Re: [gdal-dev] GDAL-Java: How to write Flot32, Int16?

2009-11-04 Thread Even Rouault
Selon Ivan ivan.luc...@pmldnet.com: I realize I hadn't yet tested with multibyte data types. I've improved the javadoc of the ReadRaster_Direct and WriteRaster_Direct methods to mention the byte ordering issue. Thanks Daniele. That takes care of the problem. ---Original Message

Re: [gdal-dev] image-io extension

2010-12-10 Thread Ivan Lucena
Ciao Simone, Salut Even, You guy did a great job improving the performance of reading and writing pixels buffer. http://www.mail-archive.com/search?l=gdal-dev%40lists.osgeo.orgq=ReadRaster_Direct But, With great power comes great responsibility. Now we find users asking for changes

Re: [gdal-dev] Re: JAVA API - Performance

2009-11-14 Thread Even Rouault
runs in about 20.3s for the ReadRaster()/WriteRaster() case, and in about 24.7s for the ReadRaster_Direct()/WriteRaster_Direct() case. Not a big advantage (which tends to not any advantage at all when run with the -server flag, as both run in about 21.3 s !), but regular Java arrays are a bit

Re: [gdal-dev] Re: JAVA API - Performance

2009-11-18 Thread Ivan
/trunk/gdal/swig/java/apps/GDALTestIO.java runs in about 20.3s for the ReadRaster()/WriteRaster() case, and in about 24.7s for the ReadRaster_Direct()/WriteRaster_Direct() case. Not a big advantage (which tends to not any advantage at all when run with the -server flag, as both run in about

Re: [gdal-dev] EXCEPTION_ACCESS_VIOLATION, when using GDAL Java API

2010-08-04 Thread Ivan Lucena
); Dataset2.SetProjection(Dataset1.GetProjection()); Dataset2.SetGeoTransform(Dataset1.GetGeoTransform()); System.out.println(Passing information from input dataset to output dataset); int XSize = 100; ByteBuffer buffer = ByteBuffer.allocateDirect(XSize); buffer = Band1.ReadRaster_Direct(0,0

Re: [gdal-dev] image-io extension

2010-12-10 Thread Simone Giannecchini
...@pmldnet.com wrote: Ciao Simone, Salut Even, You guy did a great job improving the performance of reading and writing pixels buffer. http://www.mail-archive.com/search?l=gdal-dev%40lists.osgeo.orgq=ReadRaster_Direct But, With great power comes great responsibility. Now we find users asking

Re: [gdal-dev] Re: JAVA API - Performance - Wow!

2009-11-20 Thread Simone Giannecchini
[], float[], double[]). See http://gdal.org/java    On my PC, http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/java/apps/GDALTestIO.java runs in about 20.3s for the ReadRaster()/WriteRaster() case, and in about 24.7s for the ReadRaster_Direct()/WriteRaster_Direct() case

[gdal-dev] EXCEPTION_ACCESS_VIOLATION, when using GDAL Java API

2010-08-04 Thread 菡萏的声音
dataset); int XSize = 100; ByteBuffer buffer = ByteBuffer.allocateDirect(XSize); buffer = Band1.ReadRaster_Direct(0,0,XSize,1); Band2.WriteRaster_Direct(0,0,XSize,1,buffer); Dataset2.FlushCache(); System.out.println(buffer.getLong()); Dataset1.delete(); Dataset2.delete(); } } When