[GRASS5] ERROR: cell_values_double: xdr_double failed for index 387.

Hamish hamish_nospam at yahoo.com
Mon Sep 6 03:27:25 EDT 2004

> > > > I'm getting this error when I try to access a DCELL map after setting
> > > > the region to cross 180 degrees lon:
> > ERROR: cell_values_float: xdr_float failed for index 179.
> OK, I can reproduce with:
> 	g.region -d
> 	r.mapcalc nationsF='float(nations)'
> 	g.region n=13:50S s=27:20S e=178W w=167:05E
> 	d.rast nationsF
> [Now I can't understand how I failed to reproduce it before; AFAICT,
> this will always occur if you read an FP raster when the region
> crosses the 180-degree line.]
> The problem is in how the FP versions of the resampling code access
> the input data. Essentially, they assume that the column mapping will
> always be monotonically increasing, and read the input data
> sequentially (from an XDR stream):
> It needs to check for this, and rewind the stream to the beginning if
> it occurs. Try the attached patch.

seems to work fine after patching.


More information about the grass-dev mailing list