Select to view content in your preferred language

Band Arithmetic Outputs, how to create a new file?

450
1
11-07-2023 01:30 PM
kbowe94
New Contributor II

I have a multispectral ortho (from drone photos, not using satellites) that I need to compute NDVI/NDRE for; I know how to use Band Arithmetic to get the final raster into the correct -1 - 1 range. My issue is the output creates a new layer that doesn't really exist, it's tied to the original orthomosaic and can't be saved as a layer, copied to a new map, or exported as a layout (it won't show up if you export, it's just a blank map with the legend but the raster isn't there.) Is there a way to use the band arithmetic function but have the output save as a new .tif to a new folder location? 

The workaround I tried was exporting the orthomosaic as a .tif first into the folder I want and then doing the calculations, but even with no compression and the same cell size the exported raster has very different values for the vegetation indices.  

I need to get the final NDVI/NDRE files saved as a raster with classified symbology onto an external hard drive and off of the default geodatabase it creates in the ortho mapping tab and I'm losing my mind over the different export options. 

1 Reply
MadeleineS
New Contributor

(You've probably solved this by now, though I was tearing my hair out over this for a while. Posted for yours and others benefit).

It seems that Esri's raster tools assume you've working with already separated raster band data (e.g. from Landsat or Sentinel), rather than multi-band data in a single file or raster dataset (such as the sensor data I deal with). Band Arithmetic and the Raster Calculator will fail on the 'reference' band layers ArcGIS Pro 'extracts' because these tools don't know what to point to or do with them, as it seems they're not 'multi-band aware'.

The easiest way I've found to export NDVI images (or any 'calculated' rasters) is to use the Extract Bands tool on your source raster first (found under the Raster Functions section, not the Geoprocessing section - this got me for a while), then combine the bands using the Raster Calculator in the Geoprocessing toolbox (confusing, right?!).

Process:

1. Export each band separately using the Extract Band tool, one-by-one using the Combination field:

MadeleineS_1-1716970063781.png

(Don't enter more than one band in this box at a time, or ArcGIS will combine them in the extracted layer.)

My raster data was 'exported' as 8-bit (256 value) integers, as the value ranged from 0-255 on the symbology scale. Don't worry too much about this at the moment, just note the pixel data type. Eight-bit signed values would range from -127 to 128 (note the '-' meaning 'signed').

ArcGIS pro 'extracts' the band into a new layer. Note this is just a reference to the original image, not a new flat raster file with the extracted band on its own.

2. For each 'extracted' band, export them to a flat-file raster image using the Export Raster tool (from right-clicking the layer > Data > Export Raster).

  • Ensure you select the correct pixel data type when exporting the raster. In my case, it was 8-bit unsigned.
  • I didn't worry about the NoData value as I didn't have any areas in the raster with NoData.
  • Leave 'Use Renderer' unchecked.
  • Set other parameters as required for your data and requirements, then export the raster.

3. After you have extracted all of the bands you require, open the Raster Calculator in the Geoprocessing toolbox.

MadeleineS_2-1716970861909.png

Enter the necessary calculations you require. My calculations were for NDWI, rather than NDVI, from a pre-processed image but that doesn't particularly matter here. Hit Run when you're done.

ArcGIS Pro will perform the necessary calculations, then store the result in the result in the project's default file geodatabase as a raster dataset. You can export the 'flattened' raster from there as a flat-file image if you require.