[GRASS-dev] i.colors.enhance: G_calloc() error in r.quantile with large maps

Markus Neteler neteler at osgeo.org
Sat Apr 29 14:16:41 PDT 2017


On Fri, Apr 28, 2017 at 5:05 PM, Markus Metz
<markus.metz.giswork at gmail.com> wrote:
> On Thu, Apr 27, 2017 at 1:31 PM, Markus Neteler <neteler at osgeo.org> wrote:
...
> The reason for the wrong number is integer overflow because num_values is of
> type int. Please try trunk r70982.

It fixes the problem!

GRASS 7.3.svn (grass):/scratch/s2scratch > g.region -p
projection: 99 (WGS 84 / Pseudo-Mercator)
zone:       0
datum:      wgs84
ellipsoid:  wgs84
north:      11169060
south:      10286410
west:       17960630
east:       19654740
nsres:      10
ewres:      10
rows:       88265
cols:       169411
cells:      14953061915


GRASS 7.3.svn (grass):/scratch/s2scratch > > r.quantile input=B11_255
percentiles=2,98
Computing histogram
 100%
Computing bins
Binning data
 100%
Sorting bins
 100%
Computing quantiles
0:2.000000:0.000000
1:98.000000:83.000000

I have locally backported it, works too (I'd suggest to backport).

Thanks for the fix,
markusN


More information about the grass-dev mailing list