[Gdal-dev] 'Derived' VRT bands

Pete Nagy Peter.Nagy at vexcel.com
Fri Oct 28 13:03:23 EDT 2005


Hi all ->

  I have added a new specialized type of vrt band that I've called a
'derived' band, which is a 'sourced' vrt band that derives its pixel
information from its source bands instead of overlaying the sources on top
of each other.  With this type of band you specify a pixel function which
uses the source bands to create the output raster on the fly.  This can be
handy for creating a large number of views from a dataset without
generating a lot of extra bands on disk.

  For example, you might want to display a band generated from four source
bands in a nine band input dataset (b0, b3, b4, and b8):

  pixel = sqrt((b3*b3+b4*b4)/(b0*b8));

  You can now write a pixel function to perform this calculation, register
it with GDAL using a unique key, and then create a vrt dataset band that
applies this function.  I have added a 'Using Derived Bands' section to
the vrt tutorial which goes into more detail.

  Please let me know if you encounter any difficulties or have any
suggestions.

  Cheers,

-> Pete

--------------------------------------------------------------------

====================================================================
Pete Nagy                                        tel: (303) 583-0248
Vexcel Corporation                               fax: (303) 583-0246
http://www.vexcel.com                           home: (303) 823-2336
====================================================================




More information about the Gdal-dev mailing list