Basically I'm working on a DTM raster of Austria derived from SRTM data.
Thus, the region has a native res of 90m and has 2224 rows and 2228 columns.
If I'm doing a r.los after g.region -pa res=360 it takes 1.719 s to complete the calculation (time taken through the time command). With res=180, res=120, res=90 I get the following table:
res t (s)
--- --------
360 1.72
180 17.96
120 123.68
90 688.37
It scales very badly. Is this expected? Are there better algorithms for calculating LOS then that used in r.los?
On Tue, Nov 20, 2007 at 12:46:19PM +0100, Peter Hopfgartner wrote:
Hi,
I've done some time measurements with r.los.
Basically I'm working on a DTM raster of Austria derived from SRTM data.
Thus, the region has a native res of 90m and has 2224 rows and 2228 columns.
If I'm doing a r.los after g.region -pa res=360 it takes 1.719 s to
complete the calculation (time taken through the time command). With
res=180, res=120, res=90 I get the following table:
res t (s)
--- --------
360 1.72
180 17.96
120 123.68
90 688.37
It scales very badly. Is this expected? Are there better algorithms for
calculating LOS then that used in r.los?
I have run valgrind on r.los (NC data set):
GRASS 6.3.cvs (nc_spm_06):~ > g.region -p | grep 'row\|col'
rows: 450
cols: 500
# rather small region!
Basically I'm working on a DTM raster of Austria derived from SRTM data.
Thus, the region has a native res of 90m and has 2224 rows and 2228 columns.
If I'm doing a r.los after g.region -pa res=360 it takes 1.719 s to
complete the calculation (time taken through the time command). With
res=180, res=120, res=90 I get the following table:
res t (s)
--- --------
360 1.72
180 17.96
120 123.68
90 688.37
It scales very badly. Is this expected? Are there better algorithms for
calculating LOS then that used in r.los?
Yes, it is expected that it scales very badly. Just recently a comment was
added to the help page to that effect. To speed it up you can use a cover mask
(patt_map), or try r.cva (GRASS / GEM addons), which has more cover map options
(but is based on the same slow method).
I'd advise updating to GRASS 6.2.3rc or the latest 6.3 cvs to get new fixes for
r.los.
'Photogrammetric Engineering & Remote Sensing' July 2003
'A Fast Algorithm for Approximate Viewshed Computation'
by David Izraelevitz, USACE
Hamish
____________________________________________________________________________________
Be a better pen pal.
Text or chat with friends inside Yahoo! Mail. See how. http://overview.mail.yahoo.com/