[GRASS-user] problems with r.cost

Hamish hamish_nospam at yahoo.com
Wed May 23 21:50:59 EDT 2007


Paul Haverkamp wrote:
> > > i'm a very new user to grass and am using r.cost in grass6.2.  i'm
> > > trying to run a cost analysis on my raster and having some
> > > difficulty.
..
> I am using 6.2.1, and g.region -p gives the info:
..
> north:      4269999
> south:      4180119
> west:       598614
> east:       651978
> nsres:      3
> ewres:      3
> rows:       29960
> cols:       17788
> cells:      532928480
> 
> I'm trying to run with the resolution of 3m, but when I change it to
> 30m, there isn't a problem.  Using much smaller regions doesn't seem
> to have this problem.  So is the file just too large at too small of a
> resolution?


Your region is way too large for r.cost. It should exit with a memory
error, apparently it isn't doing that. (beyond "segment_seek: invalid
argument")

In r.cost try setting percent_memory=10 or so, but it will still take a
long long long time. Try running at 30m resolution to start with.

532928480 cells (533m) would need at least 2gig RAM to run at percent=100.


watch the progress with "top" from the command line. "M" will sort by
memory use, which is a bit more stable way of watching it.


Hamish




More information about the grass-user mailing list