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

Peter Halls p.halls at york.ac.uk
Tue Mar 12 01:10:46 PDT 2013


Nick,

     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.

Best wishes,

Peter

On 11 March 2013 19:30, Nick <subscriber at linuxmail.org> wrote:

> 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.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
----------------------------------------------------------------------------------------------------------------
Peter J Halls, GIS Advisor & Team Leader Applications Support and Training,
               Information Directorate, University of York
Telephone: 01904 323806     Fax: 01904 323740
Snail mail: Harry Fairhurst Building, University of York,
                Heslington, York YO10 5DD
This message has the status of a private and personal communication
----------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130312/2b9ac9e4/attachment-0001.html>


More information about the gdal-dev mailing list