Skip to main content
Question

Designating band names with RasterBandCombiner

  • October 4, 2022
  • 6 replies
  • 61 views

Forum|alt.badge.img

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

david_r
Celebrity
  • 8391 replies
  • October 4, 2022

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.


Forum|alt.badge.img
  • Author
  • 9 replies
  • October 4, 2022

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


david_r
Celebrity
  • 8391 replies
  • October 5, 2022

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.


Forum|alt.badge.img
  • Author
  • 9 replies
  • October 5, 2022

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


david_r
Celebrity
  • 8391 replies
  • October 6, 2022

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


Forum|alt.badge.img
  • Author
  • 9 replies
  • October 6, 2022

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.