Skip to main content
Solved

Merge 3 raster bands to 1 band

  • February 2, 2022
  • 2 replies
  • 89 views

Hi,

I have 1 raster containing 3 bands. All bands contain water depths, but for separate areas. Since they are for separate areas, I would like to merge this information into one band. The final product would be 1 raster with 1 band containing the water depths for the different areas. Thanks.

Best answer by takashi

Hi @filipfaust​ , if every band has an identical "Nodata" definition that represents out of area for each band, you can separate the raster into three 1-band rasters with the RasterBandSeparator, and then merge them into one 1-band raster with the RasterMosaicker (Nodata Overwrites Data: No). Assuming the three areas don't overlap each other.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • 7842 replies
  • Best Answer
  • February 2, 2022

Hi @filipfaust​ , if every band has an identical "Nodata" definition that represents out of area for each band, you can separate the raster into three 1-band rasters with the RasterBandSeparator, and then merge them into one 1-band raster with the RasterMosaicker (Nodata Overwrites Data: No). Assuming the three areas don't overlap each other.


  • Author
  • 3 replies
  • February 2, 2022

Hi @filipfaust​ , if every band has an identical "Nodata" definition that represents out of area for each band, you can separate the raster into three 1-band rasters with the RasterBandSeparator, and then merge them into one 1-band raster with the RasterMosaicker (Nodata Overwrites Data: No). Assuming the three areas don't overlap each other.

This solved my problem, thank you!