[gdal-dev] Get hold of TIFF structure

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Get hold of TIFF structure

Norman Goldstein
Let's say I've opened a dataset (from a tiff file on disk).  How do I  
get hold of the TIFF structure that is used by the libtiff library?
Thanks.
_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Get hold of TIFF structure

Even Rouault-2
Selon Norman Goldstein <[hidden email]>:

> Let's say I've opened a dataset (from a tiff file on disk).  How do I
> get hold of the TIFF structure that is used by the libtiff library?

GDALDataset::GetInternalHandle() on a GTiff dataset will return a TIFF* handle.
But be careful. If you use GDAL compiled with internal libtiff (libtiff 4.X),
you must also link your application against libtiff 4.X, or export the libtiff
symbols of the internal version of GDAL, otherwise chaos will happen.

http://www.gdal.org/classGDALDataset.html#a39396324384dc195866a374775fa74ef

Why do you want to access the TIFF handle ? Is there information you cannot
access through GDAL API ?

> Thanks.
> _______________________________________________
> gdal-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>


--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Get hold of TIFF structure

Norman Goldstein
My apologies.  I missed your response to my question.
Thanks for pointing me to GDALDataset::GetInternalHandle()
and the tiff library compatibility gotcha's.

To answer your question, I wish to use geotiff format to work in general
XYZ space, and not necessarily tied to the Earth.  I still need
transformations like XYZ <--> IJK, and would like to set the 4x4
coefficients, directly.  I did not see how to reasonably do this trhough
the gdal interface.  Understandably, gdal is designed around the Earth.


On 08/26/2014 12:49 AM, Even Rouault wrote:

> Selon Norman Goldstein <[hidden email]>:
>
>> Let's say I've opened a dataset (from a tiff file on disk).  How do I
>> get hold of the TIFF structure that is used by the libtiff library?
> GDALDataset::GetInternalHandle() on a GTiff dataset will return a TIFF* handle.
> But be careful. If you use GDAL compiled with internal libtiff (libtiff 4.X),
> you must also link your application against libtiff 4.X, or export the libtiff
> symbols of the internal version of GDAL, otherwise chaos will happen.
>
> http://www.gdal.org/classGDALDataset.html#a39396324384dc195866a374775fa74ef
>
> Why do you want to access the TIFF handle ? Is there information you cannot
> access through GDAL API ?
>

_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev