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
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
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
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
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
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
/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
);
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
...@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
[], 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
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
11 matches
Mail list logo