[gdal-dev] Geotiff with bands of different type

Even Rouault even.rouault at mines-paris.org
Tue Aug 10 13:17:25 EDT 2010


To be more precise, Band.SetOffset() and Band.SetScale() do exist, but they are 
recent additions only available in the development version (1.8.0dev).

Le mardi 10 août 2010 15:30:54, Chaitanya kumar CH a écrit :
> Martin,
> 
> Python methods do exist.
> Refer to
> http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/tiff_write.py for
> some Python examples of these four methods.
> 
> On Tue, Aug 10, 2010 at 6:27 PM, Martin Raspaud 
<martin.raspaud at smhi.se>wrote:
> > -----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#44e23beb3418c44a89d25ea70820
> > 7fe1
> > 
> > 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-----
> > 
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev


More information about the gdal-dev mailing list