[gdal-dev] Geotiff with bands of different type

Chaitanya kumar CH chaitanya.ch at gmail.com
Tue Aug 10 09:30:54 EDT 2010


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



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100810/87886511/attachment.html


More information about the gdal-dev mailing list