[gdal-dev] Geotiff with bands of different type

Martin Raspaud martin.raspaud at smhi.se
Tue Aug 10 08:57:13 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frank Warmerdam skrev:
> On Tue, Aug 10, 2010 at 7:16 AM, Martin Raspaud <martin.raspaud at smhi.se> wrote:
>> Hmmm, that sounds like a sufficient solution indeed, very good idea, thanks.
>>
>> Is there any scale/slope and offset/intercept tags defined in geotiff ?
> 
> Martin,
> 
> GDAL supports saving this style of metadata in a private tag as
> defined at:
> 
>   http://www.awaresystems.be/imaging/tiff/tifftags/gdal_metadata.html
> 
> To do so with the GDAL API use the SetOffset and SetScale methods
> on the GDALRasterBand:
> 
>   http://www.gdal.org/classGDALRasterBand.html#44e23beb3418c44a89d25ea708207fe1

Thanks for the link. Unfortunately, I'm using the python interface with gdal
1.6.2 (since a few minutes, instead of 1.5.3), and the SetOffset/SetScale
methods are not there.

I'll use the gdal private tags instead then...


> I should note that in theory the TIFF specification allows a
> mix of sample types, but in practice this is not done in the
> real world, and libtiff does not support it.
> 
> GDAL *does* support reading mixed band types from a variety
> of file formats, but not TIFF.  As noted, AddBand() can be used
> in a few format cases to create mixed band types though this is
> rarely done.

Thanks for the explanation. We might jump over to netcdf4 if geotiff becomes too
limited.


Best regards,
Martin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMYUypAAoJEBdvyODiyJI4kA0IALDDzDRQQl/ZrwLAo2cXTpeN
3M0Mu4J5V7KNEFHaT95Hy0te+D/jLP7g7iEsJcTBuoQwoK3qBQBbgzUBIf0xMeZt
HBGoU9LCpBaZS38W/8oYri2o6nUJO8ZUrdgLlELrGsC/syVKEiIdrf8puOAiJ3pi
y5IRaYegjcNi8paRDCBD9cuedB2lnQJYKVOglh2h0pBJDa3bPbvUNrqXjjLCJls3
Eor9Vt2FVEMajcSSMz+AdnMz6gxzvMzj+0oM17WQDB4DGPTJ6BFjDp3UslLL0ldM
KcAQIt5s2FVLqqEGue/DwMlbLG4pXuz6KnIFY/+U/tMeVWjcXfnvFQIJveI4pNk=
=ce+j
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: martin_raspaud.vcf
Type: text/x-vcard
Size: 259 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100810/f2817e72/martin_raspaud.vcf


More information about the gdal-dev mailing list