Thank you for your answer. So, I exported the file as GeoTIFF and there is the gdalinfo
output I got:
Driver: GTiff/GeoTIFF
Files: check.tif
Size is 1830, 1830
Coordinate System is:
PROJCS["WGS 84 / UTM zone 29N",
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433],
AUTHORITY["EPSG","4326"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-9],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","32629"]]
Origin = (600000.000000000000000,5900040.000000000000000)
Pixel Size = (60.000000000000000,-60.000000000000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_IMAGEDESCRIPTION=check
TIFFTAG_RESOLUTIONUNIT=1 (unitless)
TIFFTAG_XRESOLUTION=1
TIFFTAG_YRESOLUTION=1
Image Structure Metadata:
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 600000.000, 5900040.000) ( 7d30' 5.54"W, 53d14'24.75"N)
Lower Left ( 600000.000, 5790240.000) ( 7d32' 6.07"W, 52d15'12.44"N)
Upper Right ( 709800.000, 5900040.000) ( 5d51'29.63"W, 53d12'29.52"N)
Lower Right ( 709800.000, 5790240.000) ( 5d55'41.96"W, 52d13'21.24"N)
Center ( 654900.000, 5845140.000) ( 6d42'20.80"W, 52d44' 2.09"N)
Band 1 Block=1830x1830 Type=Float32, ColorInterp=Gray
Band 2 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 3 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 4 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 5 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 6 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 7 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 8 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 9 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 10 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 11 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 12 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 13 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 14 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 15 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 16 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 17 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 18 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 19 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 20 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 21 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 22 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 23 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 24 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 25 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 26 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 27 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 28 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 29 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 30 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 31 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 32 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 33 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 34 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 35 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 36 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 37 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 38 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 39 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 40 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 41 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 42 Block=1830x1830 Type=Float32, ColorInterp=Undefined
Band 43 Block=1830x1830 Type=Float32, ColorInterp=Undefined
So this file does seem to have band data. For dealing with the TIFF files, I am using C++ and LibTIFF library. At the moment, my code looks like this:
TIFF* tif = TIFFOpen("check.tif", "r");
if (tif) {
uint32 imagelength;
uint32 i;
float* data;
tdata_t buf;
uint32 row;
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength);
buf = _TIFFmalloc(TIFFScanlineSize(tif));
for (row = 0; row < imagelength; row++) {
TIFFReadScanline(tif, buf, row);
data = (float*) buf;
for (i = 0; i < 1830; i++) {
for (int j = 0; j < 2; j++) {
cout << "Row: " << row << ", column: " << i << ": " << data[i] << endl;
}
}
if (row == 0) break;
}
_TIFFfree(buf);
TIFFClose(tif);
}
The pixel values I get when printing out are simple integers, such as 1467, 1471, 1514, etc. and those are clearly not the band values. So how are band values stored for each pixel? Is it in an array? I tried to put one more loop inside to loop through 43 elements, but my program crashed. Maybe LibTIFF is not suitable for this and there is other specific library?
I know this is not too much related to SNAP Toolbox, but I cannot find any information about it on the Internet. Thank you once again.