[GRASS-dev] r.cost update

Markus Metz markus.metz.giswork at googlemail.com
Thu Nov 5 11:09:00 EST 2009


North Carolina sample dataset

test from
http://lists.osgeo.org/pipermail/grass-dev/2009-July/045152.html
modified to get a larger region

g.region rast=elev_state_500m at PERMANENT res=100
# gives about 28 million cells
v.to.rast nc_state at PERMANENT use=val val=500.0 out=cost --o
v.to.rast urbanarea at PERMANENT use=val val=1 out=urbanarea --o
r.cost in=cost start_rast=urbanarea out=dist_urban percent_memory=20 --o

grass7 r.cost
real    0m55.349s
user    0m53.360s
sys    0m1.797s

grass65 r.cost
real    26m35.166s
user    2m55.612s
sys    23m37.921s

Results are identical. Reducing the memory percentage gives a hefty 
speed penalty in grass6, not so in grass7. Memory consumption is also a 
bit lower in grass7. IMO, 28 million cells is not a lot for today's 
standards, and I dare say r.cost is ready for massive datasets.

Enjoy,

Markus M



More information about the grass-dev mailing list