[gdal-dev] A few questions for a new user.

Nick subscriber at linuxmail.org
Mon Mar 11 12:30:37 PDT 2013


Hello all, I am using the Java bindings on a Windows 7 machine. I am trying to do my first conversion of a file based on the API Tutorial and the sample java files.

1) How does gdal.Open() convert the ingested data into a Dataset object? I've looked at the Javadocs and API listed, but I cannot find code for that method to explain this.

2) Is there a source file for the java bindings that has explicit code for the classes and methods of gdal that I can view?


I've been studying the GDALtest.java http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/java/apps/GDALtest.java  sample code file. It takes a selected image from the desktop and uses gdal.Open() to convert it to a Dataset and then converts that Dataset into a BufferedImage object.

I am trying to figure out how to get the Dataset object I have and just create a file with the same data as the one I opened. Then I am goiing to try and convert it to a different format.

I followed the API Tutorial http://www.gdal.org/gdal_tutorial.html  all the way to the section on using Create() and CreateCopy() methods. But then I don't know what to do with the new Dataset object I have. There must be a way to get it in the right data object that Java needs to write an image file.

Any help would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130311/8fe99639/attachment.html>


More information about the gdal-dev mailing list