Dear all,
I performed the same calculation as in the pconvert rgbprofile profile provided below through bandmath on a smaller sized tif and merging the results with gdalmerge, but the result looks different.
To elaborate: the only difference between the two input tifs is that one tif has a pixelspacing of 30 meter and one has a pixelspacing of 15 meter, therefore the first one is smaller in size and pconvert is able to perform this particular rgbprofile operation mentioned in my original post here: Issue building a large tiff image with pconvert.
To convert the larger tif of 15 meter pixelspacing, I am able to make the correct RGB tif with firstly performing a bandmath operation with snap (xml of the graph provided in attachment), and then merging these to get the same original tif with gdalmerge with this command:
gdal_merge.py -separate -n 0 -a_nodata 0 -co "PHOTOMETRIC=RGB" -co "ALPHA=YES" "Red.tif" "Green.tif" "Blue.tif" -o merge_output.tif -co BIGTIFF=YES
Since the bandmath calculations are the same as in the pconvert RGB-profile I expect the result to be exactly the same. 1 + 1 = normally 2 but with pconvert it seems to become 3. Am I missing some important calculation that pconvert does and im not doing in my bandmath?
My rgb profile for pconvert:
#RGB-Image Profile #Fri Mar 23 16:46:55 CET 2018 blue=0 name=coh_sigmaAvg_null green=if fneq(coh_VV_11Sep2018_23Sep2018,0) then max(min(floor(sigmaAverage*12.7+191.5),255),1) else 0 red=if fneq(coh_VV_11Sep2018_23Sep2018,0) then max(min(floor(coh_VV_11Sep2018_23Sep2018*256.565656566-1.56565656566),255),1) else 0
Bandmath_pconvert_rgbprofile.xml (4.2 KB)
Thanks for the support,
Thijs