Convert S2 image to GeoTif image

Hi All,

Can any one advice me how to convert .xml file to Geotif image using SNAP desktop or other python scripts please ?

Thanks , D

the xml-file only contains the metadata for the import into SNAP or other programs. You can’t open or procss the raster files properly without the xml and - vice versa - you can’t get much information out of the xml alone.

Hi Daniel,

the procedure to export Sentinel-2 data using SNAP should be the following:

  • Open Sentinel-2 data (better to open single granules rather then the full Sentinel-2 product, to avoid the generation of huge GeoTIFF files)
    File --> Open Products --> Select xml file of your product of interest

  • Resample all the bands to a common resolution (e.g. B2 at 10m)
    Raster --> Geometric Operations --> Resampling

  • Export product to GeoTIFF (BigTIFF is recommended due to file size)
    File --> Export --> GeoTIFF / BigTIFF

You can use the ‘Subset’ option within the export operator in order to reduce the dataset to be exported (e.g. not export azimuth and zenith bands)
This operator can also be found under: Raster --> Subset

Federico

2 Likes

thanks FredericoF, maybe I just misunderstood the question.

Hi @FedericoF Thanks a lot for the explanations.

But my problem is I have done some band math and created some VI products . after this I have tried to save the product which is .dim file to tif file but it gives me for example for the calculated NDVI and LAI and SR it gives one tif file with there bands with no scale values .
so how to save each band of the calculated VI ( NDVI, LAI, SR ) as individula .tif bands with its real scale values (NDVI -1 to 1) for example ?

Thanks alot , D

Dear Daniel,

If you intend to save the created bands (NDVI, LAI and SR) maintaining the the real scale values you should export your bands in GeoTIFF (using the subset module to save single band).
In fact, saving in TIFF you are going to export what you visualize as an image and the spectrum will be converted from -1 to +1 (NDVI) to 0 to 255 (8 bits used in the TIFF).

Regards,
Fabrizio

Hi Federico

I followed all steps you explained but when i want to open the image en SNAP, an error message appears: “Geotiff imageReader not found”. I Try again and again: with subset, without subset, with "save as Deam-Dimap"and after export to Geotiff, with " and nothing turned out. Can tou help me?
Thank
Alejandra

If you get the error message “GeoTiff imageReader not found” your SNAP installation must be corrupted.
Have you already tried to reinstall SNAP?

Hi Marpet

No, I didn’t trie to reinstall it. I’ll trie today.
Thank