[GRASS-SVN] r55591 - grass-addons/grass6/raster/r.inund.fluv
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 2 08:07:51 PDT 2013
Author: robertomarzocchi
Date: 2013-04-02 08:07:50 -0700 (Tue, 02 Apr 2013)
New Revision: 55591
Modified:
grass-addons/grass6/raster/r.inund.fluv/README.txt
grass-addons/grass6/raster/r.inund.fluv/r.inund.fluv
Log:
small adjustment r.inund.fluv script and readme file
Modified: grass-addons/grass6/raster/r.inund.fluv/README.txt
===================================================================
--- grass-addons/grass6/raster/r.inund.fluv/README.txt 2013-04-02 12:21:45 UTC (rev 55590)
+++ grass-addons/grass6/raster/r.inund.fluv/README.txt 2013-04-02 15:07:50 UTC (rev 55591)
@@ -7,21 +7,20 @@
- 2d_path.f90
- correction_from_path.f90
-***************************REQUEST ********************************
+***************************REQUEST **************************************
The installation of this code requests a fortran compiler installed on your computer.
For any other informations contact the autors of the script
(see description.html)
-******************************************************************
-**************** Users of GRASS 6.3 ******************************
+*************************************************************************
+**************** Users of GRASS 6.4 or 6.3 ******************************
1) open the Makefile with a text editor
2) insert the path to the source grass directory in MODULE_TOPDIR = ../..
(for example: MODULE_TOPDIR = /root/grass-6.3.0_source)
-3) in the directory where you have downloaded the files run: make
-4) go in the source grass directory
-5) run: make install
+3) run the following command to compile a single GRASS command (as sudo user)
+INST_NOW=y make
-**************** Users of GRASS 6.2 ******************************
+**************** Users of GRASS 6.2 **************************************
Rename the grass script as follows:
r.inund.fluv --> r.inund.fluv_63
r.inund.fluv_62 --> r.inund.fluv
Modified: grass-addons/grass6/raster/r.inund.fluv/r.inund.fluv
===================================================================
--- grass-addons/grass6/raster/r.inund.fluv/r.inund.fluv 2013-04-02 12:21:45 UTC (rev 55590)
+++ grass-addons/grass6/raster/r.inund.fluv/r.inund.fluv 2013-04-02 15:07:50 UTC (rev 55591)
@@ -457,7 +457,7 @@
dubbio="$GIS_OPT_DOUBT_MAP"
r.mapcalc "temp=isnull($inondazione)"
r.mapcalc "temp=if(temp,0,1)"
- r.mapcalc "$dubbio=inondazione_step2-temp"
+ r.mapcalc "$dubbio=if((inondazione_step2-temp)>0,inondazione_step2-temp,null())"
#r.mapcalculator amap=$inondazione formula='isnull(A)' outfile=temp help=- --quiet
#r.mapcalculator amap=temp formula='if(A,0,1)' outfile=temp help=- --quiet
#r.mapcalculator amap=inondazione_step2 bmap=temp formula='A-B' outfile=$dubbio help=- --quiet
@@ -468,13 +468,15 @@
echo '0 grey' >> .colore_dubbio.file
echo 'nv white' >> .colore_dubbio.file
echo 'end' >> .colore_dubbio.file
- cat .colore_dubbio.file | r.colors map=$dubbio color=rules
+ cat .colore_dubbio.file | r.colors map=$dubbio color=rules --quiet
rm .colore_dubbio.file
- g.remove rast=temp
+ g.remove rast=temp --quiet
fi
+
+
#water level assignement
-r.mapcalc "$inondazione=if($inondazione==1,$inondazione*quote_punti_adiacenti-$dtm)"
+r.mapcalc "$inondazione=if($inondazione==1,if(($inondazione*quote_punti_adiacenti-$dtm)>0,($inondazione*quote_punti_adiacenti-$dtm),null()))"
#r.mapcalculator amap=$inondazione bmap=quote_punti_adiacenti cmap=$dtm formula='if(A==1,A*B-C)' outfile=$inondazione help=- --quiet
#COLOURS OF INUNDATION RASTER MAP
@@ -483,7 +485,7 @@
echo '0 aqua' >> ".colore_inondazione.file"
echo 'nv white' >> ".colore_inondazione.file"
echo 'end' >> ".colore_inondazione.file"
-cat ".colore_inondazione.file" | r.colors map=$inondazione color=rules
+cat ".colore_inondazione.file" | r.colors map=$inondazione color=rules --quiet
rm ".colore_inondazione.file"
More information about the grass-commit
mailing list