[GRASS-user] r.viewshed add-on is taking too long

Markus Metz markus.metz.giswork at googlemail.com
Tue Jun 12 14:59:58 PDT 2012


On Tue, Jun 12, 2012 at 9:52 PM, Chaulio Ferreira <chaulio at hotmail.com> wrote:
> Hello everyone,
>
> I've been trying to compute some viewsheds using the r.viewshed module
> (available in http://grass.osgeo.org/wiki/GRASS_AddOns), but it's taking to
> long to finish.
>
> I ran this module on a 5000x5000 (95mb) raster grid and it took 3min 17sec
> to finish. I have seen some articles where it's said that this module is
> capable of computing raster grids bigger than this one in 18 seconds. I also
> tested it on a bigger raster grid (33000x33000, 4.05gb), and it took almost
> 3 days to finish!
>
> So, I was wondering if I've been doing something wrong, because the
> execution times seem to be much bigger than the expected.
>
> I'm using an Intel Core 2 duo 2.93GHz, with 4GB RAM and Ubuntu 10.04 32bits.
> My GRASS version is GRASS 6.4.3svn. The command line I used was:
>
> r.viewshed -b --overwrite input=r9_5000 at PERMANENT output=vs_r9_5k
> coordinate=2500,2500 obs_elev=50 tgt_elev=50 memory=2000

Since you are using a 32 bit OS, the amount of memory given to
r.viewshed (2000 MB) might be too large. Try with the default 500 MB.

The speed of r.viewshed depends on several factors: CPU speed,
available memory and disk IO speed. For very large input maps, disk IO
speed is the limiting factor, as long as the amount of memory
specified with the memory option is below the available free [0]
memory.

Markus M

[0] man free

>
> I used coordinate=2500,2500 because the terrain bounds are X:0~5000 and
> Y:0~5000 and I wanted the observer to be sited at the center of it. I had
> tried to import this same raster grid (using r.in.bin) with smaller bounds
> (X:0~50 and Y:0~50) and to run r.viewshed with coordinate=25,25, but I
> received the following assertion error:
>
> Determine visibility...
> r.viewshed: statusstructure.cpp:73: float get_vertical_angle(Viewpoint,
> StatusNode, surface_type, int): Assertion `fabs(sn.dist2vp) > 0.001' failed.
> Aborted
>
>
> Does anyone use this Add-on and has some running times to show me and
> compare with mine? Or does someone knows if I am doing something wrong?
>
> Thanks,
>
> Chaulio Ferreira
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>


More information about the grass-user mailing list