I have a raster dataset that contains Sentinel-1 and Sentinel-2 images covering 11 month period a year. The problem is, I downloaded all these images in Google Earth Engine but SNAP doesn’t recognize band names. When I open the dataset in another application such as ArcGIS I can see the band’s names. By the way, the images that I exported are all GeoTIFF. Is there a way that I can import an image with band names in SNAP?
As the standard specification for geotiff does not provide a way to name bands, Google is using some special format here, which ArcGIS seems to understand.
SNAP is doing the same and external software does not understand the names.
Maybe it works using the internal GDAL reader.
In the open dialog select the file type:
GeoTIFF (GDAL <version>)
If this doesn’t work, you can open it once in SNAP and rename the bands.
Right-click on the band and select Properties. In the upcoming dialog you can change the name.
The save the file as NetCDF or BEAM-DIMAP, or again as GeoTIff.
With NetCDF the naming will be readable in all NetCDF supporting software.
Metadata outsde the GeoTIFF “standard” is usually stored either with tags or an auxiliary XML file. If using the GDAL reader doesn’t capture the band names you could try using
gdal_translate (command-line), or QGIS to convert your GeoTIFF files to NetCDF4-CF format, which does have a robust metdata standard that includes band names and is now well supported by current software.
For more information:
GDAL Raster Data Model describes GDAL’s use of tags for metadata. On the command line,
gdalinfo can show these tags.
GDAL GeoTIFF driver says:
Other non standard metadata items can be stored in a TIFF file created with the profile GDALGeoTIFF (the default, see below in the Creation issues section). Those metadata items are grouped together into a XML string stored in the non standard TIFFTAG_GDAL_METADATA ASCII tag (code 42112). When BASELINE or GeoTIFF profile are used, those non standard metadata items are stored into a PAM .aux.xml file.
I create geotiff’s from netcdf files using
gdal_translate on multiple platforms. On Windows, using gdal_translate from QGIS 3.22.0, I get .tif.aux.xml files. On linux. using he distro GDAL package, the same metadata are stored as tags.
Thank you gnwii, Since the marpet’s solution worked well I haven’t tried your solution. But it can be convenient to use gdal on command line for bigger datasets.