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

Markus Metz markus.metz.giswork at googlemail.com
Wed Jun 13 07:12:34 PDT 2012


On Wed, Jun 13, 2012 at 12:21 AM, Chaulio Ferreira <chaulio at hotmail.com> wrote:
> Markus M,
>
> Thanks for answering. I'll try to use the default 500mb. But I still think
> these differences in the times are too big.

I was testing a bit and can confirm the differences. Still, r.viewshed
is much faster than r.los.

> I am not using a big map (just
> 95mb, it would fit 5 times in the RAM memory) and a rather regular PC. On
> this email
> (http://lists.osgeo.org/pipermail/grass-dev/2008-October/040669.html) you
> said r.viewshed took 18 seconds, but for which map size? What are your
> computer configurations?

That was the other Markus. The map size was probably around 10 million cells.

> If you ever made other tests on r.viewshed times,
> would you mind to show me the results?

Sure! I'm still busy testing, will report results soon.

>
> Sorry for making so much questions, and thank you for the attention.

These are not that many questions, thanks for providing feedback!

Markus M

>
> Chaulio Ferreira.
>
>
>> Date: Tue, 12 Jun 2012 23:59:58 +0200
>> Subject: Re: [GRASS-user] r.viewshed add-on is taking too long
>> From: markus.metz.giswork at googlemail.com
>> To: chaulio at hotmail.com
>> CC: grass-user at lists.osgeo.org
>
>>
>> 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