[GRASS-user] Mask doesn't work for r.los

Hamish hamish_b at yahoo.com
Wed Nov 19 01:36:46 EST 2008


William Hudspeth wrote:
> I am trying to run r.los using a mask. My work flow is as follows:
> 
> 1. Draw a vector polygon boundary around the area for which I want to
> run r.los.
> 
> 2. Convert the polygon to a raster mask with a category value of 1
> inside the poloygon:
> 
> v.to.rast in=viewshed_mask_bnds out=viewshed_mask use=val value=1
> 
> 3. Use the raster mask to generate a viewshed:
> 
> r.los input=project_dem output=viewshed coordinate=313347,3643638 \
>    obs_elev=1.75 max_dist=10000 patt_map=viewshed_mask
> 
> After r.los finishes processing, I am left with a viewshed that covers
> the entire current region - it extends well outside the boundaries of
> the mask...
> 
> Not sure what I'm doing wrong....

ISTR there were some bugs surrounding that which were fixed prior to 
the release of GRASS 6.3.0. Which version of GRASS are you using?

In earlier versions of GRASS your mask needs to be 0/1, not NULL/1.

see: http://trac.osgeo.org/grass/changeset?new=grass%2Ftrunk%2Fraster%2Fr.los%2Fpts_elim.c%4025104&old=grass%2Ftrunk%2Fraster%2Fr.los%2Fpts_elim.c%4018934


also you might try the new r.viewshed in grass add-ons and also the r.cva addon.


Hamish



      



More information about the grass-user mailing list