Exporting RGB image as a Geotiff

Hello everyone,

Thanks ever so much for this wonderful tool and the forum.

I am trying to export an RGB image/geotiff but having some trouble.

I have opened a Sentinel 2 product and opened an RGB image window, which has all worked (see screenshot)

I have been trying to export this RGB as a geotiff. I tried exporting as a GeoTIFF/BigTiff but looks like something is wrong with the file itself as its dimensions are 0x0, even though it is 320MB. When I try to open it on Photoshop I get just a white screen and can’t seem to get anything when I put it in QGIS either.

When using the export as GeoTIFF option, the file looks empty (0MB).

Any ideas what I can do to export the RGB image?

Thanks,

Nassos

Hi Nassos,

it seems there are some issues with exporting S2 to GeoTiff. However, you can do the following.
Open the product and create a subset (Raster/Subset…) which contains only the required bands (B2,B3,B4) and the area you are interested in. Afterwards open the RGB image. Now right-click on the image and select “Export View as Image” from the context menu.

cheers
Marco

Hi @marpet, thanks for the reply, much appreciated. Am trying now - but can’t seem to figure out how to create a subset. I select the product, then as you say go to Raster/Subset, but I don’t seem to get any additional options to create that subset. Is there an additional step I have to do in order to create the subset so that I can select the RGB bands?

You need to open the product in 10 meter resolution.

If you then go to Raster/Subset a dialog should appear where you can select the spatial extent and the bands to be included into the subset.

1 Like

Thanks again @marpet. I have done this, however when I right-click and try to export as GeoTiff it says GeoTIFF is not applicable.
When I also try just standard tiff or even jpg/png, it also throws an error, a different one though (see below)

Thanks again for your help.

Best,

Nassos

For exporting to GeoTiff you need to select the option ‘Full scene’ in the export dialog.


Regarding the other exports. Maybe it is a memory problem and you don’t have enough memory available. How much do you have?
Do you see a little stop sign in the lower right corner after the error was shown. Click on it. Maybe it it gives some more insight on the problem.

Yep, the ‘full scene’ option did the trick, it worked - perfect, thank you very much. To be honest the GeoTIFF is the version I wanted, I just tried as an alternative to get a tiff or jpg. Memory shouldn’t be an issue, running a 16GB ram Macbook with 330GB hard disk space remaining.

Will try the visible region image again and send you the report if you want to chase it up as well.

Out of curiosity, when you open a product, what is the Sentinel native resolution? Is it not 10m?

Thanks again for all the help @marpet!

Best,

Nassos

Would be great if you could send me the error report for JPEG export.
For Sentinel-2 L1C the resolution depends on the band. Some are 10m, some are 20m and others are 60m.
The support for such multi-resolution products is still limited. But we work on it.

Great, no, the help is brilliant. Hm, I have just run the jpg and tiff export and it has now worked, so that seems to have been resolved!

Thank you once again for the help, all has been resolved.

Best,

Nassos

Hi, I am trying to export to Geotiff.

When trying to export I get this: Writing this product as GeoTIFF is not possible:
Cannot write multisize products. Consider resampling the product first.

With Raster/Subset I get: Writing this product as GeoTIFF is not possible:
Cannot write multisize products. Consider resampling the product first.

Any idea on how to proceed?

Thanks

Hi,

as said in the error message. You need to resample the data first to a common resolution.
Choose from the menu Raster / Geometric Operations / Resampling.
Afterwards you can subset and write it out as GeoTiff.

1 Like

How much enough memory can export GeoTiff?

@Thang1805
This really depends on the size of the data to want to export.
A Sentinel-2 image in 10m resolution might need 8GB RAM or even more in 60m resolution already 2GB might be enough.
So I can’t give a general answer.

A post was split to a new topic: No option to select the resolution on open

Hi Marpet,

I’ve been following this thread, and trying to recreate the steps mentioned above. I’m new to the forum and processing Sentinel data in general. My question is, if I’m trying to create RGB Geotiffs at 10m, at what point in the process do I resample the imagery, and to what specification?

Thanks in advance.

Best,
John

Hi

resampling the data should be the first step. Afterwards you can create the RGB images from it.
What do you mean by specification? The output file format? You can keep it in memory and you don’t need to write it to disk. But it might b better to write it in terms of memory usage. If you write such a resampled product you should write it to BEAM-DIMAP. This format best preserves all product properties.

1 Like

Hello,

The problem of exporting S2 to GeoTiff seems to still exit. I am just getting to know SNAP and am not able to export to this format. Do you have any advice?

Please note that I have resampled the bands I need to have the same pixel size. I do not only need the RGBs but 10 or 11 bands. So, the suggestion you have here also doesn’t suite me.

Thank you for your time,
Elsy

How much RAM do you have in your computer? It should be at least 8GB.
Maybe this can help you?

When you use the suggested graph you should adapt the gpt.vmoptions to increase the memory which can be used.
Add
-Xmx9G
You can find the file in the bin folder of the installation directory.