Select to view content in your preferred language

Update Raster Band Metadata / Band Names

2104
5
09-21-2021 01:24 PM
NickWeil
Regular Contributor

I am working with hyperspectral data and am trying to update the band name after it gets lost during processing.

The raster comes in with the specific wavelength information associated with the file:

NickWeil_0-1632255297281.png

After my mosaic process to bring several of these hyperspectral image cubes together, I am left with layer 1, layer 2, layer 3, etc.:

NickWeil_1-1632255407596.png

I have tried using the Key Metadata function template to assign band names to my files, but because the output only exists in my project, it seems that I would need to export this "in memory" file to save the band name information.

NickWeil_2-1632255693726.png

I would like to avoid replicating these 20+ GB files as I have quite a few of them.

Is there a way to assign band names from my initial file (ideally) or assign them from a comma separated list as in the raster function tool?

Any help would be greatly appreciated!

0 Kudos
5 Replies
Luke_Pinner
MVP Regular Contributor

Perhaps try the Set Raster Properties tool instead of the raster function.

0 Kudos
NickWeil
Regular Contributor

Thanks @Luke_Pinner for the suggestion! I had tried this tool, but was looking for something less manual. I have 270 bands in the SWIR and 274 in the VisNIR and it appears I have to type in the wavelengths one by one:

NickWeil_0-1632314897871.png

I am not a python person, but maybe that is the answer...

0 Kudos
NickWeil
Regular Contributor

I wanted to provide some information after working with ESRI technical support on this issue.

Firstly, this tool does not work with hyperspectral data. There is an open bug regarding this issue (BUG-000143872).

I did find out some critical information about how the tool works for non-hyperspectral rasters. To update the band name information, the "Name" field in the Key Properties section should contain the current band name (e.g. Band_1, Layer_1, etc). The help documentation was a bit ambiguous.

Set Raster Properties to update band namesSet Raster Properties to update band names

I also found the Get Raster Properties tool to be helpful to gather my hyperspectral band information. I used the tool on an original raster with the band properties still intact:

Get Raster Properties to collect band namesGet Raster Properties to collect band names

Using the wavelength function and leaving the band selection blank, I was able to run the tool and view details. The output printed a list of all the band names and the wavelength ranges. I copied this text and brought it into Excel where I was able to break apart the strings and format all the information properly. This made it easy to build a python script to update the Set Raster Properties tool.

Set Raster Properties python exampleSet Raster Properties python example

Ultimately, this did not work for my data, but hopefully the information is helpful for other users.

 

 

0 Kudos
Pacho95
New Contributor

Hi!

I have the same problem regarding viewing the spectral profile and the information with the bands.

I have worked with ENVI to generate band ratios and later I joined together the different band ratios and bands. When I upload the new raster it didn't show the wavelengths of the bands and the spectral profiles are not working.

Can you please help me? 

Regards!

 

Pacho95_0-1644376549384.png

Pacho95_1-1644376601154.png

 

0 Kudos
NickWeil
Regular Contributor

Hi @Pacho95 - sorry I don't have an answer for you. I have not gotten an update on this bug from ESRI, so I do not know if they will implement a fix. From what I have experienced using Arc Pro for hyperspectral processing, I would recommend that you stick with ENVI if at all possible. I was told by a colleague that R could be used to assign wavelengths, but that is outside of my expertise. Best of luck!

0 Kudos