[Gdal-dev] VRT Raw File Access

Frank Warmerdam warmerdam at pobox.com
Fri Jul 30 17:58:45 EDT 2004


Folks,

At the request of Atlantis I have implemented support for accessing raw
raster file based on writing a VRT (XML) header file.  This has some advantages
over existing ascii header formats support (such as PCI .aux, ENVI and ESRI BIL)
that include:
  o The virtual dataset can include data from a variety of files.
  o A variety of packing orders are supported, including different swapping,
    and odd spaces.
  o All GDAL supported pixel types are supported including complex.
  o The VRT file can include any amount of supporting information such as
    metadata, georeferencing, etc.

I have committed an initial implementation but I haven't really done too much
testing (though a small test script is in gdalautotest/gdrivers/vrtrawlink.py).
I have not updated any of the documentation accordingly yet.  However, to give
you a flavour, here is a .vrt file making 4 raw Convair PolGASP data files
appear to be a single dataset.

<VRTDataset rasterXSize="1172" rasterYSize="1864">
   <VRTRasterBand dataType="CFloat32" band="1" subClass="VRTRawRasterBand">
     <SourceFilename relativetoVRT="1">l2p3hhsso.img</SourceFilename>
     <ImageOffset>0</ImageOffset>
     <PixelOffset>8</PixelOffset>
     <LineOffset>9376</LineOffset>
     <ByteOrder>MSB</ByteOrder>
   </VRTRasterBand>
   <VRTRasterBand dataType="CFloat32" band="2" subClass="VRTRawRasterBand">
     <SourceFilename relativetoVRT="1">l2p3hvsso.img</SourceFilename>
     <ImageOffset>0</ImageOffset>
     <PixelOffset>8</PixelOffset>
     <LineOffset>9376</LineOffset>
     <ByteOrder>MSB</ByteOrder>
   </VRTRasterBand>
   <VRTRasterBand dataType="CFloat32" band="3" subClass="VRTRawRasterBand">
     <SourceFilename relativetoVRT="1">l2p3vhsso.img</SourceFilename>
     <ImageOffset>0</ImageOffset>
     <PixelOffset>8</PixelOffset>
     <LineOffset>9376</LineOffset>
     <ByteOrder>MSB</ByteOrder>
   </VRTRasterBand>
   <VRTRasterBand dataType="CFloat32" band="4" subClass="VRTRawRasterBand">
     <SourceFilename relativetoVRT="1">l2p3vvsso.img</SourceFilename>
     <ImageOffset>0</ImageOffset>
     <PixelOffset>8</PixelOffset>
     <LineOffset>9376</LineOffset>
     <ByteOrder>MSB</ByteOrder>
   </VRTRasterBand>
</VRTDataset>

I would add that we hope to update the OpenEV "raw define" tool to use .vrt so
that we can support all pixel types.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list