[GRASS-SVN] r61899 - grass/trunk/gui/wxpython/xml grass/trunk/raster grass/trunk/raster/r.horizon grass/trunk/raster/r.viewshed grass-addons/grass7/raster grass-addons/grass7/raster/r.los grass-addons/grass7/raster/r.los/testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 13 10:50:42 PDT 2014


Author: wenzeslaus
Date: 2014-09-13 10:50:42 -0700 (Sat, 13 Sep 2014)
New Revision: 61899

Added:
   grass-addons/grass7/raster/r.los/
   grass-addons/grass7/raster/r.los/testsuite/
   grass-addons/grass7/raster/r.los/testsuite/test_using_rviewshed.sh
Removed:
   grass/trunk/raster/r.los/
   grass/trunk/raster/r.viewshed/testscript.sh
Modified:
   grass-addons/grass7/raster/Makefile
   grass/trunk/gui/wxpython/xml/toolboxes.xml
   grass/trunk/raster/Makefile
   grass/trunk/raster/r.horizon/r.horizon.html
   grass/trunk/raster/r.viewshed/r.viewshed.html
Log:
r.los: move to addons; move the r.viewshed test to r.los because it requires both

Modified: grass/trunk/gui/wxpython/xml/toolboxes.xml
===================================================================
--- grass/trunk/gui/wxpython/xml/toolboxes.xml	2014-09-13 17:12:53 UTC (rev 61898)
+++ grass/trunk/gui/wxpython/xml/toolboxes.xml	2014-09-13 17:50:42 UTC (rev 61899)
@@ -806,9 +806,6 @@
       <module-item name="r.viewshed">
         <label>Visibility</label>
       </module-item>
-      <module-item name="r.los">
-        <label>Visibility [DEPRECATED]</label>
-      </module-item>
       <module-item name="r.grow.distance">
         <label>Distance to features</label>
       </module-item>

Modified: grass/trunk/raster/Makefile
===================================================================
--- grass/trunk/raster/Makefile	2014-09-13 17:12:53 UTC (rev 61898)
+++ grass/trunk/raster/Makefile	2014-09-13 17:50:42 UTC (rev 61899)
@@ -43,7 +43,6 @@
 	r.latlong \
 	r.lake \
 	r.li \
-	r.los \
 	r.mapcalc \
 	r.mfilter \
 	r.mode \

Modified: grass/trunk/raster/r.horizon/r.horizon.html
===================================================================
--- grass/trunk/raster/r.horizon/r.horizon.html	2014-09-13 17:12:53 UTC (rev 61898)
+++ grass/trunk/raster/r.horizon/r.horizon.html	2014-09-13 17:50:42 UTC (rev 61899)
@@ -178,7 +178,6 @@
 <em>
 <a href="r.sun.html">r.sun</a>,
 <a href="r.sunmask.html">r.sunmask</a>,
-<a href="r.los.html">r.los</a>,
 <a href="r.viewshed.html">r.viewshed</a></em>
 
 

Modified: grass/trunk/raster/r.viewshed/r.viewshed.html
===================================================================
--- grass/trunk/raster/r.viewshed/r.viewshed.html	2014-09-13 17:12:53 UTC (rev 61898)
+++ grass/trunk/raster/r.viewshed/r.viewshed.html	2014-09-13 17:50:42 UTC (rev 61899)
@@ -226,7 +226,6 @@
 <h2>SEE ALSO</h2>
 
 <em>
-<a href="r.los.html">r.los</a>,
 <a href="r.mapcalc.html">r.mapcalc</a>
 </em>
 

Deleted: grass/trunk/raster/r.viewshed/testscript.sh
===================================================================
--- grass/trunk/raster/r.viewshed/testscript.sh	2014-09-13 17:12:53 UTC (rev 61898)
+++ grass/trunk/raster/r.viewshed/testscript.sh	2014-09-13 17:50:42 UTC (rev 61899)
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# Test script for r.viewshed based on a synthetic DEM
-# RUN THIS IS ANY GRASS LOCATION, e.g. NC or Spearfish
-
-# create first hemisphere
-g.region n=1000 s=0 w=0 e=1000 -p res=1
-r.mapcalc 'disk.15031=if(sqrt((col() - 500)^2 + (500 - row())^2)<500,sqrt((col() - 500)^2 + (500 - row())^2),null())'
-r.mapcalc 'hemisphere1=500 * sin(acos (disk.15031/500))'
-
-# create second hemisphere
-g.region n=500 s=0 w=0 e=500 -p res=1
-r.mapcalc 'disk.14947=if(sqrt((col() - 500)^2 + (500 - row())^2)<500,sqrt((col() - 500)^2 + (500 - row())^2),null())'
-r.mapcalc 'hemisphere2=500 * sin(acos (disk.14947/500))'
-g.remove --q rast=disk.14947,disk.15031
-# merge both
-r.mapcalc "hemisphere=hemisphere1 + hemisphere2"
-
-d.mon x0
-d.rast hemisphere
-
-# run r.viewshed
-r.viewshed hemisphere out=hemisphere_viewshed coord=250,250 max=1000000 obs=100 mem=2000 --o
-r.shaded.relief hemisphere --o
-d.his h=hemisphere_viewshed i=hemisphere.shade
-
-# compare to r.los
-r.los hemisphere out=hemisphere_los coord=250,250 max=1000000 obs=100 --o
-d.mon x1
-d.his h=hemisphere_los i=hemisphere.shade
-
-r.mapcalc "hemisphere_diff = hemisphere_viewshed - hemisphere_los"
-r.colors hemisphere_diff color=differences
-d.mon x2
-d.rast.leg pos=80 map=hemisphere_diff
-
-nviz hemisphere col=hemisphere_viewshed
-

Modified: grass-addons/grass7/raster/Makefile
===================================================================
--- grass-addons/grass7/raster/Makefile	2014-09-13 17:12:53 UTC (rev 61898)
+++ grass-addons/grass7/raster/Makefile	2014-09-13 17:50:42 UTC (rev 61899)
@@ -14,6 +14,7 @@
 	r.hydrodem \
 	r.in.srtm.region \
 	r.in.wms2 \
+	r.los \
 	r.mcda.ahp \
 	r.mcda.input \
 	r.mcda.output \

Copied: grass-addons/grass7/raster/r.los/testsuite/test_using_rviewshed.sh (from rev 61224, grass/trunk/raster/r.viewshed/testscript.sh)
===================================================================
--- grass-addons/grass7/raster/r.los/testsuite/test_using_rviewshed.sh	                        (rev 0)
+++ grass-addons/grass7/raster/r.los/testsuite/test_using_rviewshed.sh	2014-09-13 17:50:42 UTC (rev 61899)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+# Test script for r.viewshed based on a synthetic DEM
+# RUN THIS IS ANY GRASS LOCATION, e.g. NC or Spearfish
+
+# create first hemisphere
+g.region n=1000 s=0 w=0 e=1000 -p res=1
+r.mapcalc 'disk.15031=if(sqrt((col() - 500)^2 + (500 - row())^2)<500,sqrt((col() - 500)^2 + (500 - row())^2),null())'
+r.mapcalc 'hemisphere1=500 * sin(acos (disk.15031/500))'
+
+# create second hemisphere
+g.region n=500 s=0 w=0 e=500 -p res=1
+r.mapcalc 'disk.14947=if(sqrt((col() - 500)^2 + (500 - row())^2)<500,sqrt((col() - 500)^2 + (500 - row())^2),null())'
+r.mapcalc 'hemisphere2=500 * sin(acos (disk.14947/500))'
+g.remove --q rast=disk.14947,disk.15031
+# merge both
+r.mapcalc "hemisphere=hemisphere1 + hemisphere2"
+
+d.mon x0
+d.rast hemisphere
+
+# run r.viewshed
+r.viewshed hemisphere out=hemisphere_viewshed coord=250,250 max=1000000 obs=100 mem=2000 --o
+r.shaded.relief hemisphere --o
+d.his h=hemisphere_viewshed i=hemisphere.shade
+
+# compare to r.los
+r.los hemisphere out=hemisphere_los coord=250,250 max=1000000 obs=100 --o
+d.mon x1
+d.his h=hemisphere_los i=hemisphere.shade
+
+r.mapcalc "hemisphere_diff = hemisphere_viewshed - hemisphere_los"
+r.colors hemisphere_diff color=differences
+d.mon x2
+d.rast.leg pos=80 map=hemisphere_diff
+
+nviz hemisphere col=hemisphere_viewshed
+



More information about the grass-commit mailing list