Dear all
I have some strange behaviour in r.mapcalc that i can not figure out the
reason.
I have a Float32 raster with very large pixels values
wget
https://www.dropbox.com/s/pxh473rs34wvxuc/basin_lbasin_172_oft_crop.tif?dl=0
min                      max
241981407232    3266766176256
I want rescale to in such a way that  the min is reachin 1 and the maximum
value is - min
Therfore
min=241981407231.0
r.mapcalc  " output  =   float( float(input)   - $min  ) "
and i get

min max output
1  3024784719872
which rather should be
3266766176256 - 241981407231 = 3024784769025

It seems to me that the subtraction is working fine for small numbers but
not for larger numbers.
I tried all the combinations of
r.mapcalc  " output  =   float( float(input)   - $min  ) "
r.mapcalc  " output  =   float( input   - $min  ) "
Attached the script.
Did I reach some numerical limitation?
Any suggestions?
Thanks giuseppe



-- 
Giuseppe Amatulli, Ph.D.

Research scientist at
School of the Environment
Yale University
New Haven, CT, USA - 06511
Tweeter: @BigDataEcology
Teaching: http://spatial-ecology.net
Work:  https://environment.yale.edu/profile/giuseppe-amatulli/

Attachment: sc39_lbasin_basin_uniq_CompUnit_test.sh
Description: application/shellscript

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to