[GRASSLIST:2790] Re: r.cost produces no output??
Eric G. Miller
egm2 at jps.net
Sun Dec 16 23:07:06 EST 2001
On Sat, 01 Dec 2001 17:43:03 -0700, Michael Barton <michael.barton at asu.edu> wrote:
> I am trying to work my way through the various grass modules. Today, I
> tried to produce cost surfaces using r.cost. I am using grass 5.0pre2
> with the tcltk interface. I tried it with the Spearfish data set, trying
> both with a DEM and a slope map as the base maps. I tried both x,y
> coordinates and a site map as points from which to compute the cost
> surface. I turned on verbose mode to check the output.
> It seemed to run and produced no error messages.
> The problem is that it produces no apparent output. I have tried varying
> the name of the output file and having it write to an existing file.
> Nothing produced any output. I have write permissions in the relevant
> directory and have successfully done other things (e.g., a viewshed
Well, I've found at least one case where r.cost can Segment Fault. But,
since you point out you don't see any errors, it might be as simple as
the region settings. Most GRASS programs that operate on rasters are
region sensitive. That is, if the input or output extents don't
overlap, then no output is produced. Most programs should report an
error and exit if they see it; not sure if r.cost verifies the
I know if you run r.cost with only "input" and "output" args, and
"output" doesn't already exist, it will segfault (as it tries to
open "output" to use for "start" points, but it doesn't check
that a previous search for the file failed). Also, it seems to
have problems in it's file search routines, which may erroneously
fail (but again, you didn't see these errors...).
Perhaps you want to post some of the ways you invoked it? It might
help in tracing the ways it might fail to produce output.
Eric G. Miller <egm2 at jps.net>
More information about the grass-user