[gdal-dev] GeoTiff writing with Java Bindings (signed
data types)
abhay menon
abhay.menon at gmail.com
Wed Jan 16 14:41:48 EST 2008
Hi,
Pardon me for the intrusion in this post related to Geotiff with GDAL(Java
bind).
I was wondering the list discussion was oriented towards the implementation
and the bind of the GDAL half of the GDAL/OGR bind has anyone implemented or
used the OGR half of the bind as well.
I tried a small test with Java OGR bind as follows, (I tried to hack the
GdalTest.java for this ):
OgrTest.java
-----------------------------------------------------------------------------------------
import org.gdal.ogr.Driver;
import org.gdal.ogr.ogr;
public class OgrTest
{
public OgrTest() {
}
public static void main(String[] args) {
System.out.println("OGR init...");
ogr.RegisterAll();
int count = ogr.GetDriverCount();
System.out.println(count + " available Drivers");
for (int i = 0; i < count; i++) {
try {
Driver driver = ogr.GetDriver(i);
System.out.println(" " + driver.GetName() + " ");
} catch (Exception e) {
System.err.println("Error loading driver " + i);
}
}
}
}
------------------------------------------------------------------------------------------
Is there any documentation or sample that exists for the same which is
advance enough to create complex application.
Rgds
Abhay.
On Jan 14, 2008 10:38 PM, Stefan Keller <sfkeller at gmail.com> wrote:
> Obviously, there seems to be quite some interest in a Java binding to
> GDAL/OGR.
> Can someone summarize and perhaps update the wiki/documentation with
> instructions and example downloads?
> Any volunteers to become a committer for this Java Binding?
>
> -- Stefan
>
> 2008/1/14, Stefan Mietke <St.Mietke at gmx.de>:
>
> > Thats it! It works, wow ...
> >
> > For interested list members:
> >
> > The solution of this problem is simple:
> >
> > After allocating a ByteBuffer, you have to set the Byte order, before
> > reading the raster with 'ReadRaster_Direct()' method.
> >
> > ByteBuffer byteBuffer = ByteBuffer.allocateDirect(buffer_size);
> > byteBuffer.order (ByteOrder.nativeOrder());
> >
> > For the writing process you have to do the same with the output
> > ByteBuffer.
> >
> > I thank Daniele Romagnoli and Benjamin Collins for their great support.
> >
> > Stefan Mietke
> > --
> > 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
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20080117/5a18fe7e/attachment.html
More information about the gdal-dev
mailing list