I have a number of product subsets that have been processed in SNAP using the Band Math operation. I would like to export the images with associated pixel values into QGIS. Which is the best practice and what format should I use?
actually, this step is not always necessary. Inside the data folder of your product, you find img files with the rasters. If the data is geocoded, you can directly open the img files in QGIS.
Conversion to other formats (e.g. GeoTiff) often changes the data type (float to integer) and drastically changes the values in your data (reported in many cases)
The image files seem to be working ok, but the Min/Max values are definitely wrong in QGIS , but correct in snap’s Get Value From Data option (the data is normalized in SNAP to -1/1 at the most!). This is not a problem though as Min/Max in QGIS style can be defined manually.
QGIS doesn’t stretch the data over the full range (min/max) automatically. It uses a different way of reducing the range for better contrasts than SNAP. Please look in the raster statistics to see the real min and max values.
For example, this is the table of contents in QGIS:
In the layer properties, you see that QGIS leaves out the 2% smallest and largest values to enhance the contrast. SNAP in turn uses 2.5%. But this is only a visual thing.
The real min and max values
are shown in the raster statistics
Sometimes, a scaling factor is applied on the data in SNAP (but not outside):