Hi folks,
I have to program a little script that, starting from 2 points (A and B) on a raster map (a DEM), calculate first 3 shortest going-down paths (from A to B).
It seems to be easy, but this is the first time i try to program GRASS and I don't know how to proceed.
Thank you,
Antonio Giglio.
________________________________________________________________________
SERVIZIO VOICE: TELEFONA e INVIA SMS dal tuo computer a tariffe vantaggiose!
Scopri come telefonare e videochiamare gratis da pc a pc.
http://voice.repubblica.it
Hi,
first I suggest to look at alerady existing GRASS modules.
If already existing path calculation modules is not an option for You:
First You will need an algorithm how to travel from cell to cell and
calculate path length. I suggest to look at A*
(http://en.wikipedia.org/wiki/A-star_search_algorithm). It's quite
simple.
Second You ahve to read r.mapcalc man page to see how this algorithm
can be implemented. Actualy coding it in C for GRASS is peace of cake,
if You can do same with shell and mapcalc.
wbr,
Maris.
On 4/6/06, giglio.antonio@katamail.com <giglio.antonio@katamail.com> wrote:
Hi folks,
I have to program a little script that, starting from 2 points (A and B) on
a raster map (a DEM), calculate first 3 shortest going-down paths (from A to
B).
It seems to be easy, but this is the first time i try to program GRASS and I
don't know how to proceed.
Thank you,
Antonio Giglio.
________________________________________________________________________
SERVIZIO VOICE: TELEFONA e INVIA SMS dal tuo computer a tariffe vantaggiose!
Scopri come telefonare e videochiamare gratis da pc a pc.
http://voice.repubblica.it