Question

Designating band names with RasterBandCombiner

  • 4 October 2022
  • 6 replies
  • 2 views

Badge

This is likely a simple question: I have a workspace set up to read, sample, clip, sort and combine Sentinel-2 data into a single raster with 9 bands. It works fine. The default band numbers generated by RasterBandCombiner are 1-9, but I'd like to name the bands based on the original Sentinel-9 band numbers as displayed in the original rasters. Is there a simple way to designate the raster band names using something like the fme_basename?


6 replies

Userlevel 4

The RasterBandCombiner can generate a list of the band/raster names, e.g. based on fme_basename. You can then use this list in the RasterBandNameSetter to set all the band names in one go.

Badge

Thanks for the information David. I feel like I'm getting closer but can't seem to get the parameters right.

Here are the parameters in the RasterBandCombiner:

CombinerAnd here are the RasterBandNameSetter parameters:

NameSetter

Userlevel 4

Thanks for the information David. I feel like I'm getting closer but can't seem to get the parameters right.

Here are the parameters in the RasterBandCombiner:

CombinerAnd here are the RasterBandNameSetter parameters:

NameSetter

The list name is invalid, try simply typing in something like "_bandNames" or similar. You only need this list for the RasterBandNameSetter just after, so the name isn't important. You can safely delete the list after the RasterBandNameSetter, if you want.

Badge

Sorry to be such a dolt here. I've followed your advice and then tried a number of parameter changes in the RasterBandNameSetter and just can't seem to get the bands to be named properly. I really do appreciate your help!

 

Combiner:

CombinerNameSetter

NameSetter

Userlevel 4

Sorry to be such a dolt here. I've followed your advice and then tried a number of parameter changes in the RasterBandNameSetter and just can't seem to get the bands to be named properly. I really do appreciate your help!

 

Combiner:

CombinerNameSetter

NameSetter

I've joined a sample workspace here (FME 2020 for compatibility).

You can see the band names in the Inspector:

image

Badge

Thanks for your help on this! The bands are named properly, I think they were named properly already, I just wasn't inspecting them the right way.

Reply