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

Markus Neteler neteler at osgeo.org
Tue May 2 13:50:14 PDT 2017

On Mon, May 1, 2017 at 3:27 PM, Markus Metz
<markus.metz.giswork at gmail.com> wrote:
> On Mon, May 1, 2017 at 11:17 AM, Markus Neteler <neteler at osgeo.org> wrote:
>> On Sun, Apr 30, 2017 at 10:39 PM, Markus Metz
>> ...
>> > 16+GB of RAM still seems too much to me, unless the histograms of the
>> > cell
>> > values are highly skewed. What is the output of r.stats -c for B04_255,
>> > B11_255, B8A_255?
>> Since this comes from our automated processing chain I could only
>> reimport the resulting S2 bands which should not change much.
> If NULL values are correctly set, I would assume about 4 GB of RAM needed by
> r.quantile.
> If there are no NULL cells, I would assume about 14 GB of RAM which is close
> to what you observed.
> Can you check your processing chain to make sure the nodata value is
> correctly set?
> Also note that there are about 7 billion NULL cells in B04, but only 1.7
> billion NULL cells in B8A and B11.

Yeah, weird. Perhaps the atmospheric correction did not behave for all channels.

I am currently re-running all the steps from scratch and try to hold
it when reaching i.colors.enhance.
That takes several hours to get there :p

>> I think they are (strongly) skewed: will send the data off-list to you.
> The cell count for value 1 is quite high in all three bands. Is this
> expected? However, the cell count for value 1 does not explain the high RAM
> consumption of 16+ GB.

The data are processed for the Web, i.e. Geoserver. We have no clear
no-data border but cookie-stamp the true data using a mask later.
The old style Sentinel-2 data are composed of many tiles which doesn't
make things easier. Only since end of last year single tile S2 data
are produced by ESA.

We rescale the bands to 0..255 in order to reduce the massive amount
of data for the Web (we don't do that of course when producing GIS
This leads to the skewed histogram...

However, the scene is unique in being difficult, many others just went
through without troubles. And this one, too, once I had added more
swap space.


More information about the grass-dev mailing list