Nick,<br><br>     you are asking questions about the inner workings of GDAL/OGR, rather than the Java API.  At the heart of GDAL/OGR is a library of C++ functions that do the work.  So, when you open a dataset, the low level routines obtain memory for the data structures, populate them and pass, as a result, a pointer to these data structures - the dataset object.  If you want to understand this part of the process, then you must study the C++ code or, at the very least, the C++ Class definitions that are on the GDAL web pages.<br>
<br>Best wishes,<br><br>Peter<br><br><div class="gmail_quote">On 11 March 2013 19:30, Nick <span dir="ltr"><<a href="mailto:subscriber@linuxmail.org" target="_blank">subscriber@linuxmail.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span style="font-family:Verdana"><span style="font-size:12px">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.<br>
<br>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.<br><br>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?<br>
<br><br>I've been studying the <a href="http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/java/apps/GDALtest.java" target="_blank"><span></span>GDALtest.java</a> 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.<br>
<br><span><span style="font-family:Verdana;font-size:12px">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.<br>
<br>I followed the <a href="http://www.gdal.org/gdal_tutorial.html" target="_blank"><span></span>API Tutorial</a> 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.<br>
<br>Any help would be greatly appreciated.</span></span></span></span>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>----------------------------------------------------------------------------------------------------------------<br>
Peter J Halls, GIS Advisor & Team Leader Applications Support and Training, <br>               Information Directorate, University of York<br>Telephone: 01904 323806     Fax: 01904 323740<br>Snail mail: Harry Fairhurst Building, University of York, <br>
                Heslington, York YO10 5DD<br>This message has the status of a private and personal communication<br>----------------------------------------------------------------------------------------------------------------<br>