I have a raster which has a single band containing what is effectively a lookup code. When I open the raster in ArcMap and open the attribute table I can see several fields which I guess come from the accompanying .vat.dbf file. There is also a .csv file for looking up the field values.

I want to output a multiband raster where the bands are formed from a selection of the fields found in the input raster. So effectively converting some of the fields to bands.

I know that this could be achieved by first creating serval single-band rasters using the Lookup function inside the RasterCalculator to extract each required field and the use the Composite Bands tool to produce the desired output. However, the dataset is fairly large so this would take too long, can anyone suggest a more efficient way?

Any solution using GDAL, GRASS, QGIS or ArcGIS (with SA Extension) is welcome.


1 Answer 1

  • QGIS is out, it doesn't support raster attribute tables at all.
  • I don't know about GRASS.
  • GDAL would require you to (manually or in python code) handcraft VRTs with lookup tables from the attribute table fields for each "band", then composite the VRTs.
  • In ArcGIS, you can only use Lookup and Composite Bands. However, look at the versions of those functions for on the fly processing i.e raster functions, not the spatial analyst map algebra functions.

You could build a raster function template to do the lookup and composite in one go (kind of like model builder). You then have to save the custom function and apply it.


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.