[GRASS-user] Problem with r.univar and very large values
johannesradinger at gmail.com
Wed Apr 17 01:04:09 PDT 2013
I just faced a problem when trying to run r.univar (both GRASS6.5 and
GRASS7) on a raster which was multiplied by a very large value (1e+200) in
a python script.
The raster is displayed correctly and the cells can be querried and give
the correct large value but r.univar gives: *** stack smashing detected
***: r.univar terminated
As the map is not mutliplied using r.mapcalc but here I used the interface
to numpy arrays. Here a short working example (with the fields raster map
of the small spearfish example dataset). Probably this might work with
other raster input as well.
# With small spearfish dataset
import grass.script.array as garray
large_value = float(1e+200)
x1 = garray.array()
result = garray.array()
result[...] = x1 * large_value
And then running r.univar on result_test produces this error on my machine.
Can anyone reproduce that?
What might cause that problem? Does anyone have an idea? E.g. do some
summary value get to large (E.g. sum) to be processed? #
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user