Martin,<br><br>Python methods do exist.<br>Refer to <a href="http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/tiff_write.py">http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/tiff_write.py</a> for some Python examples of these four methods.<br>
<br><div class="gmail_quote">On Tue, Aug 10, 2010 at 6:27 PM, Martin Raspaud <span dir="ltr"><<a href="mailto:martin.raspaud@smhi.se">martin.raspaud@smhi.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
</div>Frank Warmerdam skrev:<br>
<div class="im">> On Tue, Aug 10, 2010 at 7:16 AM, Martin Raspaud <<a href="mailto:martin.raspaud@smhi.se">martin.raspaud@smhi.se</a>> wrote:<br>
>> Hmmm, that sounds like a sufficient solution indeed, very good idea, thanks.<br>
>><br>
>> Is there any scale/slope and offset/intercept tags defined in geotiff ?<br>
><br>
> Martin,<br>
><br>
> GDAL supports saving this style of metadata in a private tag as<br>
> defined at:<br>
><br>
> <a href="http://www.awaresystems.be/imaging/tiff/tifftags/gdal_metadata.html" target="_blank">http://www.awaresystems.be/imaging/tiff/tifftags/gdal_metadata.html</a><br>
><br>
> To do so with the GDAL API use the SetOffset and SetScale methods<br>
> on the GDALRasterBand:<br>
><br>
> <a href="http://www.gdal.org/classGDALRasterBand.html#44e23beb3418c44a89d25ea708207fe1" target="_blank">http://www.gdal.org/classGDALRasterBand.html#44e23beb3418c44a89d25ea708207fe1</a><br>
<br>
</div>Thanks for the link. Unfortunately, I'm using the python interface with gdal<br>
1.6.2 (since a few minutes, instead of 1.5.3), and the SetOffset/SetScale<br>
methods are not there.<br>
<br>
I'll use the gdal private tags instead then...<br>
<div class="im"><br>
<br>
> I should note that in theory the TIFF specification allows a<br>
> mix of sample types, but in practice this is not done in the<br>
> real world, and libtiff does not support it.<br>
><br>
> GDAL *does* support reading mixed band types from a variety<br>
> of file formats, but not TIFF. As noted, AddBand() can be used<br>
> in a few format cases to create mixed band types though this is<br>
> rarely done.<br>
<br>
</div>Thanks for the explanation. We might jump over to netcdf4 if geotiff becomes too<br>
limited.<br>
<div class="im"><br>
<br>
Best regards,<br>
Martin<br>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.9 (GNU/Linux)<br>
Comment: Using GnuPG with Fedora - <a href="http://enigmail.mozdev.org/" target="_blank">http://enigmail.mozdev.org/</a><br>
<br>
</div>iQEcBAEBAgAGBQJMYUypAAoJEBdvyODiyJI4kA0IALDDzDRQQl/ZrwLAo2cXTpeN<br>
3M0Mu4J5V7KNEFHaT95Hy0te+D/jLP7g7iEsJcTBuoQwoK3qBQBbgzUBIf0xMeZt<br>
HBGoU9LCpBaZS38W/8oYri2o6nUJO8ZUrdgLlELrGsC/syVKEiIdrf8puOAiJ3pi<br>
y5IRaYegjcNi8paRDCBD9cuedB2lnQJYKVOglh2h0pBJDa3bPbvUNrqXjjLCJls3<br>
Eor9Vt2FVEMajcSSMz+AdnMz6gxzvMzj+0oM17WQDB4DGPTJ6BFjDp3UslLL0ldM<br>
KcAQIt5s2FVLqqEGue/DwMlbLG4pXuz6KnIFY/+U/tMeVWjcXfnvFQIJveI4pNk=<br>
=ce+j<br>
-----END PGP SIGNATURE-----<br>
<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>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>