[GRASS-user] Re: Selecting a sector of the viewshed
AhmadKhaled
vbkhp at yahoo.com
Thu Apr 15 19:52:34 EDT 2010
Well, I think it wasn't that hard anyway. Here is how I did it. First, you
should calculate the angle of each point with respect to the center of the
circle (the observer's position). Then you can select those points which
reside in the wanted range.
grass.mapcalc("${temp} = if(isnull(${temp1}), null(), if(
atan(x()-${i0},y()-${i1}) < ${low} || atan(x()-${i0},y()-${i1}) > ${high},
null(), ${temp}))",
temp = map,
low = low_angle_range,
high = high_angle_range,
i0 = areawest+position[0],
i1 = areasouth+position[1])
--
View this message in context: http://n2.nabble.com/Selecting-a-sector-of-the-viewshed-tp4907825p4910614.html
Sent from the Grass - Users mailing list archive at Nabble.com.
More information about the grass-user
mailing list