[GRASS-user] problems with r.cost

Jonathan Greenberg greenberg at ucdavis.edu
Thu May 24 13:14:36 EDT 2007

Hamish (and all): Paul is working with me on this project, and the system we
are running it on is a 64-bit debian system with plenty of RAM/scratch space
(and the version we are using is the 64-bit grass release) -- why would
memory problems be an issue?  We tried lowering the % memory but it doesn't
seem to help...


-----Original Message-----
From: grassuser-bounces at grass.itc.it [mailto:grassuser-bounces at grass.itc.it]
On Behalf Of Hamish
Sent: Wednesday, May 23, 2007 6:51 PM
To: Paul Haverkamp
Cc: grassuser at grass.itc.it
Subject: Re: [GRASS-user] problems with r.cost

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

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.


grassuser mailing list
grassuser at grass.itc.it

More information about the grass-user mailing list