[GRASS-SVN] r62066 - grass-addons/grass7/raster/r.droka
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 24 05:25:53 PDT 2014
Author: kikapu
Date: 2014-09-24 05:25:53 -0700 (Wed, 24 Sep 2014)
New Revision: 62066
Modified:
grass-addons/grass7/raster/r.droka/r.droka.py
Log:
R.droka update
Modified: grass-addons/grass7/raster/r.droka/r.droka.py
===================================================================
--- grass-addons/grass7/raster/r.droka/r.droka.py 2014-09-24 09:53:59 UTC (rev 62065)
+++ grass-addons/grass7/raster/r.droka/r.droka.py 2014-09-24 12:25:53 UTC (rev 62066)
@@ -212,11 +212,6 @@
grass.mapcalc('F=D*E',
overwrite = True)
- #calcolo numero massi
- grass.mapcalc('somma=if(vel>0,1,0)', overwrite = True)
- somma.read('somma')
- tot[...] = (somma + tot).astype(float)
-
# calcolo velocita
grass.mapcalc('vel = $red*sqrt(2*9.8*F)',
red = red, overwrite = True)
@@ -224,6 +219,11 @@
velMax[...] = (np.where(velocity>velMax,velocity,velMax)).astype(float)
velMean[...] = (velocity + velMean).astype(float)
+ #calcolo numero massi
+ grass.mapcalc('somma=if(vel>0,1,0)', overwrite = True)
+ somma.read('somma')
+ tot[...] = (somma + tot).astype(float)
+
# calcolo energia
grass.mapcalc('en=$m*9.8*F/1000',
m = m,
@@ -256,3 +256,12 @@
if __name__ == "__main__":
options, flags = grass.parser()
sys.exit(main())
+
+
+
+# codice da aggiungere per leggere la pendenza dl layer vettoriale
+#ZN = grass.read_command("v.db.select", flags="c", map="geochimcal", col="ZN")
+#ZN=(ZN.split("\n"))
+#ZN= ZN[0:(len(ZN)-1)]
+#print ZN
+#['40', '55', '65', '158', '44', '282', '62', '83', '84', '97', '61', '58', '40', '54', '75', '129', #'77', '87', '74', '47', '58', '73', '64', '46', '63']
More information about the grass-commit
mailing list