SUMMARY: least cost path file conversion

Paul W. Box sanduku at nervm.nerdc.ufl.edu
Tue Apr 30 08:00:00 EDT 1996



Hello List

Here is a summary of the question that I put out last week

Original Question:

> I would like to know if there is a straightforward way to do this.  I
> would like to take a least-cost path route created by r.drain, and
> export the results to a simulation in the form of a list of cells or
> lat-long coordinates.  For example, if r.drain is used to calculate the
> least cost path between two cells, then I would like to get a list of
> the individual cells that the path crosses in the order that they're
> crossed.
>

It seems that there are two ways to go about this.  If you are
interested in getting a list of the cells or cell locations, then
r.stats will give you that.  You still may be left with the task of
sorting the cells to place them in a proper sequence.

However, r.thin + r.line will give you a vector of the path, and the
ascii output from that will give you the locations in the order which
they're crossed.

Thanks to Conn Copas, Simon Cox, and Rod Paterson for their prompt
replies.

-- 
/**********************************************************************/
/*  Paul Box                      |        Cogito ergo                */
/*  Dept. of Geography            |      Oculum Dioscoreum            */
/*  University of Florida         |                                   */
/*  sanduku at nervm.nerdc.ufl.edu   |     (I think, therefor            */
/*  http://grove.ufl.edu/~sanduku |           eye yam)                */
/*                                |                                   */
/**********************************************************************/





More information about the grass-dev mailing list