[GRASS-user] problems with r.cost

Jerry Nelson gnelson at uiuc.edu
Wed May 23 14:06:40 EDT 2007

One thing to try if you haven't already is to recompile grass with large
file support included. I don't know why that's not done automatically but
apparently it isn't.

Another, if region size is really the issue and you are a C programmer or
know one, is to modify the make file of a grass add-on called r.terracost.
It was written as a CS project at Bowdoin at a time when grass was at
version 5.3. With the move to version 6, the make process changed slightly.
The r.terracost files are available at

Or you could get grass5.3 and run r.terracost with it.

Regards, Jerry

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

Hi Hamish,

Thanks for getting back to me.

I am using 6.2.1, and g.region -p gives the info:

projection: 1 (UTM)
zone:       10
datum:      nad83
ellipsoid:  grs80
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?
 I'll try to run Spearfish and let you know.

thanks again,


> 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.
> which version of 6.2? 6.2.0 or 6.2.1?
> how big is your region? (g.region -p) Does it happen if you make the
> region smaller or adjust the resolution?
> can you reproduce it using the Spearfish demo dataset? if so, can you
> post instructions with that in the grass bug tracker?
> thanks,
> Hamish

grassuser mailing list
grassuser at grass.itc.it

More information about the grass-user mailing list