Using r.cost with multiple starting points with my students, the question came up whether it is possible to use the resulting cumulative cost surface to assign each pixel the cat (or other info) of its closest starting point, so something like r.grow.distance, but taking into account the cost, not necessarily the distance.
On Fri, Jul 10, 2009 at 9:37 AM, Moritz
Lennert<mlennert@club.worldonline.be> wrote:
Using r.cost with multiple starting points with my students, the question
came up whether it is possible to use the resulting cumulative cost surface
to assign each pixel the cat (or other info) of its closest starting point,
so something like r.grow.distance, but taking into account the cost, not
necessarily the distance.
Any ideas ?
(Un)related wish: while you are at it, could you also compare the results
of r.terracost in the Addons repository [1]? If as expected, I would suggest
to replace r.cost with the code of r.terracost in GRASS 7.
thanks
Markus
[1] The new Addons installer might greatly facilitate the installation
On Fri, Jul 10, 2009 at 9:37 AM, Moritz
Lennert<mlennert@club.worldonline.be> wrote:
Using r.cost with multiple starting points with my students, the question
came up whether it is possible to use the resulting cumulative cost surface
to assign each pixel the cat (or other info) of its closest starting point,
so something like r.grow.distance, but taking into account the cost, not
necessarily the distance.
Any ideas ?
(Un)related wish: while you are at it, could you also compare the results
of r.terracost in the Addons repository [1]? If as expected, I would suggest
to replace r.cost with the code of r.terracost in GRASS 7.
Using two different examples I use in current teaching (dataset nc_spm_06):
So, differences are non-negligeable, but no idea how to
interpret them at this stage, i.e. don't know which one is
"correct".
I would suggect to try with some simple geometric cost, like
was done for the Knight's move example graphic in the r.cost
help page. Then you can use your eye to locate differing bias
(e.g. from 8/16 compass points).
So, differences are non-negligeable, but no idea how to
interpret them at this stage, i.e. don't know which one is
"correct".
I would suggect to try with some simple geometric cost, like
was done for the Knight's move example graphic in the r.cost
help page. Then you can use your eye to locate differing bias
(e.g. from 8/16 compass points).
It seems as if r.terracost only counts have a distance between the original cell and its neighbors, but then goes on to count complete distances. This seems to be enough to explain the difference between the two results.
Don't know what is generally considered the "right" way, but intuitively I would side with r.cost.