How to make an RGB image out of individual band files? (bands 2, 3 and 4) Instead of downloading the whole product, I downloaded the individual band files.
to make an RGB all the bands must be in the same product. Here it is explained how you can do it: Create a new band in a BEAM-DIMAP product from another product's band
You could use GDAL (e.g. www.gdal.org/gdal_merge.html) in the command prompt:
python C:\\Anaconda2\pkgs\gdal-2.1.1-np110py27_vc9_1\Scripts\gdal_merge.py -o <path_out> -separate <path_band4> <path_band3> <path_band2>
thanks, I read the instructions, but if I use band math, it asks to choose product, but the thing is there´s no product, just the 3 bands.
Sorry, i think i have not explained properly. The steps should be:
- Open every image/band in SNAP: File->Open Product… At the end of the process you will have 3 products in the product explorer.
- Raster->Band Maths… : select as target product the first one for example and in “Edit expression” you choose the band of other product
At the end of this process you should have two of the three bands in the first product.
- Repeat the step 2 to add the other band to product
- Right-click on product -> Open RGB Image Window and choose the red, green and blue bands.
thanks Omar! we are getting close. I was able to join the bands altogether in a product, but when open RGB window, I see a dark screen.
If you open the bands individually, do you see them properly?
yes, I do
I do not know what the problem is.
Does any exception occur? In the navigation window (bottom left) can you see the image or it is a dark screen? Have you tested other images?
I think it might be useful to develop some kind of an RGB-image window/wizard to SNAP that would facilitate the selection of bands and playing around with combinations, possibly on the fly. What do others think?
Good idea, in my case, I am located in south america and internet bandwidth
is a great limitation, it takes about a week to download a whole product,
while I can download four bands in one day (2,3,4 and 8 for RGB and NDVI).
What it would be great is if you could make RGB and NDVI without
downloading the complete product, just the individual bands.
If your bandwidth is that low you might want to consider a service like Google EE where you don’t need to download the S-2 products in order to work with them.
I dont know about google EE. It would be just fine if you could composite individual bands.
I also just tried what omar suggested and it worked for me too.
But maybe you also want to consider the option not to store just the expression but the data in the target product.
But regardless if I set this option or not. It worked.
But I also agree with mengdahl that we could further improve the dialog. At least allowing the usage of bands also from other compatible products (SNAP-564).
Regarding the interactive changing of the RGB image it is already somehow possible. For example if you store the channels as virtual bands in the product. In this case you can change the expressions in the band properties and the image will be updated.
This is what I commented on JIRA about this, I think an RGB-selector tool that would facilitate exploration of multitemporal datasets could be developed:
I’ve been doing some brainstorming about this so bear with me. We could develop an RGB-selector tool that would display commonly used band combinations in a matrix using large thumbnail images. Then the user could select what she likes based on the thumbnail name/appearance. As there are 1716 unique ways of selecting 3 bands from a 13-band S-2 image, obviously the user cannot explore the possibilities by inputting them band-by-band manually.