Opened 9 years ago

Closed 6 years ago

#1528 closed defect (fixed)

r.mapcalc within a FCELL mask cell_values_float: xdr_float failed

Reported by: pertusus Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Default Version: svn-trunk
Keywords: xdr, r.mapcalc Cc:
CPU: x86-64 Platform: Linux


This is not a very reproducible bug, but intermitently reproducible. I do a FCELL mask, with output=circle10 coordinate=$x,$y min=0 max=10000
echo "$x|$y|1" | input=- output=seed
r.patch input=seed,circle10 output=circle10_seed

and after the mask is set, a r.mapcalc gives:

r.mask circle10_seed
r.mapcalc "result_$nr = continent_fa - circle10_seed"
ERROR: cell_values_float: xdr_float failed for index 47

This is not so easily reproduced, to reproduce it I need the continent_fa map which is a flow accumulation map from hydro1k...

I attach a tarball to reproduce the issue. First you need to run


which downloads using wget, and unpack.

Then you can test with


The r.mapcalc is in a loop because it doesn't error each time.

If the mask is CELL, for instance by using:

echo "$x|$y|1" | input=- output=seed type=CELL

there is no error.

There is no such error with 6.4.

Attachments (1)

bug_grass_mask_mapcalc.tar.gz (1.4 KB) - added by pertusus 9 years ago.

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by pertusus

comment:1 Changed 9 years ago by pertusus

You need to have #1525 fixed to be able to have a FCELL mask.

comment:2 Changed 6 years ago by neteler

Keywords: xdr r.mapcalc added
Resolution: fixed
Status: newclosed

The issue got solved since XDR was removed from raster2D in GRASS GIS 7:

[neteler@oboe bug_grass_mask_mapcalc]$ sh 
 100% complete. Raster map <circle10> created.
Reading input data...
Writing to output raster map...
 100% complete. 1 points found in region.
All subsequent raster operations will be limited to the MASK area. Removing
or renaming raster map named 'MASK' will restore raster operations to
[neteler@oboe bug_grass_mask_mapcalc]$ 

Note: See TracTickets for help on using tickets.