Opened 13 years ago

Closed 10 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

Description

This is not a very reproducible bug, but intermitently reproducible. I do a FCELL mask, with

r.circle output=circle10 coordinate=$x,$y min=0 max=10000
echo "$x|$y|1" | r.in.xyz 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

./prepare_hydro1k.sh

which downloads using wget, and unpack.

Then you can test with

./lambert_map.sh

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" | r.in.xyz 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 13 years ago.

Download all attachments as: .zip

Change History (3)

by pertusus, 13 years ago

comment:1 by pertusus, 13 years ago

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

comment:2 by neteler, 10 years ago

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

Note: See TracTickets for help on using tickets.