[gdal-dev] Combining raw .vrt with derived bands
Scott Staniewicz
scott.stanie at gmail.com
Wed Mar 11 07:49:49 PDT 2020
Is it possible to have a VRTRawRasterBand and a VRTDerivedRasterBand, which
is derived from that Raw file, together as two bands in a single VRT file?
I've got a CFloat32 raster file with only one complex band in binary format
(called "20160327_20160420.int" in the example below), and I've figured out
how to make a VRT for it so I can load it with GDAL.
"20160327_20160420.int.vrt":
<VRTDataset rasterXSize="720" rasterYSize="720">
<VRTRasterBand dataType="CFloat32" band="1" subClass="VRTRawRasterBand">
<SourceFilename relativeToVRT="1">20160327_20160420.int</SourceFilename>
<ImageOffset>8</ImageOffset>
<PixelOffset>8</PixelOffset>
<LineOffset>5760</LineOffset>
<ByteOrder>LSB</ByteOrder>
</VRTRasterBand>
<SRS>WGS84</SRS>
<GeoTransform> ...</GeoTransform>
</VRTDataset>
This works great. I've also figured out how to make a derived raster band
from this that shows the amplitude of the data, and also the phase (below):
"20160327_20160420.int.phase.vrt":
<VRTDataset rasterXSize="720" rasterYSize="720">
<SRS>...</SRS>
<GeoTransform> ...</GeoTransform>
<VRTRasterBand dataType="Float32" band="1"
subClass="VRTDerivedRasterBand">
<Description>phase of 20160327_20160420.int.vrt </Description>
<SimpleSource>
<SourceFilename
relativeToVRT="1">20160327_20160420.int.vrt</SourceFilename>
<SourceBand>1</SourceBand>
<SourceProperties RasterXSize="720" RasterYSize="720"
DataType="CFloat32" BlockXSize="720" BlockYSize="1" />
</SimpleSource>
<PixelFunctionType>phase</PixelFunctionType>
<SourceTransferType>CFloat32</SourceTransferType>
</VRTRasterBand>
</VRTDataset>
But I can't figure out how I would get both of these as two bands in one
VRT without causing an infinite recursion. Is that possible? Or do I need
to keep them separate?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200311/44cf556f/attachment.html>
More information about the gdal-dev
mailing list