Просмотр исходного кода

add spaces around '=' for r.mapcalc examples

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40477 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 15 лет назад
Родитель
Сommit
8f2e6e6fa5

+ 1 - 1
imagery/i.evapo.time_integration/i.evapo.time_integration.html

@@ -28,7 +28,7 @@ If you only have one meteorological station data, the easiest way is:
 n=0
 n=0
 for ETo_val in Eto[1] Eto[2] ...
 for ETo_val in Eto[1] Eto[2] ...
 do
 do
-	r.mapcalc eto$n=$ETo_val 
+	r.mapcalc "eto$n = $ETo_val" 
 	`expr n = n + 1'
 	`expr n = n + 1'
 done
 done
 
 

+ 2 - 2
raster/r.cost/r.cost.html

@@ -221,13 +221,13 @@ used. The calculation is done with <em>r.cost</em> as follows
 
 
 <div class="code"><pre>
 <div class="code"><pre>
   g.region rast=roads -p
   g.region rast=roads -p
-  r.mapcalc "area.one=1"
+  r.mapcalc "area.one = 1"
   r.cost -k input=area.one output=distance start_rast=roads
   r.cost -k input=area.one output=distance start_rast=roads
   d.rast distance
   d.rast distance
   d.rast.num distance
   d.rast.num distance
 
 
   #transform to metric distance from cell distance using the raster resolution:
   #transform to metric distance from cell distance using the raster resolution:
-  r.mapcalc "dist_meters=distance * (ewres()+nsres())/2."
+  r.mapcalc "dist_meters = distance * (ewres()+nsres())/2."
   d.rast dist_meters
   d.rast dist_meters
 </pre></div>
 </pre></div>
 
 

+ 1 - 1
raster/r.in.mat/r.in.mat.html

@@ -51,7 +51,7 @@ floating point array, so this usually isn't an issue. To save space, once the
 map is loaded into GRASS you can convert it back to an integer map with the 
 map is loaded into GRASS you can convert it back to an integer map with the 
 following command:
 following command:
 <div class="code"><pre>
 <div class="code"><pre>
-r.mapcalc int_map="int(MATFile_map)"
+r.mapcalc "int_map = int(MATFile_map)"
 </pre></div>
 </pre></div>
 
 
 <tt>NaN</tt> values in either floating point or double-precision floating point
 <tt>NaN</tt> values in either floating point or double-precision floating point

+ 1 - 1
raster/r.in.xyz/r.in.xyz.html

@@ -227,7 +227,7 @@ Ridge, NC, LIDAR dataset</a>, and process into a clean DEM:
 
 
 <li> <em>n</em> map <tt>percent=100</tt> and <tt>percent=xx</tt> maps
 <li> <em>n</em> map <tt>percent=100</tt> and <tt>percent=xx</tt> maps
   differ slightly (point will fall above/below the segmentation line)
   differ slightly (point will fall above/below the segmentation line)
-  <br>Investigate with "<tt>r.mapcalc diff=bin_n.100 - bin_n.33</tt>" etc.
+  <br>Investigate with "<tt>r.mapcalc diff = bin_n.100 - bin_n.33</tt>" etc.
   <br>Cause unknown.
   <br>Cause unknown.
 
 
 <li> "<tt>nan</tt>" can leak into <em>coeff_var</em> maps.
 <li> "<tt>nan</tt>" can leak into <em>coeff_var</em> maps.

+ 1 - 1
raster/r.li/r.li.patchdensity/r.li.patchdensity.html

@@ -24,7 +24,7 @@ Example for Spearfish forest areas:
 g.region rast=landcover.30m -p
 g.region rast=landcover.30m -p
 # extract forested areas:
 # extract forested areas:
 r.category landcover.30m
 r.category landcover.30m
-r.mapcalc "forests=if(landcover.30m >= 41 && landcover.30m <=43,1,null())"
+r.mapcalc "forests = if(landcover.30m >= 41 && landcover.30m <=43,1,null())"
 
 
 # patch density (7x7 moving window defined in r.li.setup):
 # patch density (7x7 moving window defined in r.li.setup):
 r.li.patchdensity forests conf=movwindow7 out=forests_p_dens7
 r.li.patchdensity forests conf=movwindow7 out=forests_p_dens7

+ 1 - 1
raster/r.statistics/r.statistics.html

@@ -76,7 +76,7 @@ Calculation of average elevation of each field in the Spearfish region:
 <div class="code"><pre>
 <div class="code"><pre>
 r.statistics base=fields cover=elevation.dem out=elevstats method=average
 r.statistics base=fields cover=elevation.dem out=elevstats method=average
 r.category elevstats
 r.category elevstats
-r.mapcalc "fieldelev=@elevstats"
+r.mapcalc "fieldelev = @elevstats"
 r.univar fieldelev
 r.univar fieldelev
 </pre></div>
 </pre></div>
 
 

+ 1 - 1
raster3d/r3.cross.rast/r3.cross.rast.html

@@ -51,7 +51,7 @@ g.region -d
 g.region res=150 res3=150 t=1000 b=0 tbres=100
 g.region res=150 res3=150 t=1000 b=0 tbres=100
 
 
 # synthetic data, could be geological structures:
 # synthetic data, could be geological structures:
-r3.mapcalc "map3d=sin(row())+sin(col())+sin(depth()*depth())"
+r3.mapcalc "map3d = sin(row())+sin(col())+sin(depth()*depth())"
 
 
 #create a cutplane map
 #create a cutplane map
 r.mapcalc "cutplane = col()*10"
 r.mapcalc "cutplane = col()*10"

+ 6 - 6
raster3d/r3.gwflow/r3.gwflow.html

@@ -67,12 +67,12 @@ groundwater flow area and data. Make sure you are not in a lat/lon projection.
 g.region res=25 res3=25 t=100 b=0 n=1000 s=0 w=0 e=1000
 g.region res=25 res3=25 t=100 b=0 n=1000 s=0 w=0 e=1000
 
 
 #now create the input raster maps for a confined aquifer
 #now create the input raster maps for a confined aquifer
-r3.mapcalc "phead=if(row() == 1 && depth() == 4, 50, 40)"
-r3.mapcalc "status=if(row() == 1 && depth() == 4, 2, 1)"
-r3.mapcalc "well=if(row() == 20 && col() == 20 , -0.00025, 0)"
-r3.mapcalc "hydcond=0.00025"
-r3.mapcalc "syield=0.0001"
-r.mapcalc  "recharge=0.0"
+r3.mapcalc "phead = if(row() == 1 && depth() == 4, 50, 40)"
+r3.mapcalc "status = if(row() == 1 && depth() == 4, 2, 1)"
+r3.mapcalc "well = if(row() == 20 && col() == 20 , -0.00025, 0)"
+r3.mapcalc "hydcond = 0.00025"
+r3.mapcalc "syield = 0.0001"
+r.mapcalc  "recharge = 0.0"
 
 
 r3.gwflow --o -s solver=cg phead=phead status=status hc_x=hydcond hc_y=hydcond  \
 r3.gwflow --o -s solver=cg phead=phead status=status hc_x=hydcond hc_y=hydcond  \
 hc_z=hydcond q=well s=syield r=recharge output=gwresult dt=8640000 velocity=gwresult_velocity
 hc_z=hydcond q=well s=syield r=recharge output=gwresult dt=8640000 velocity=gwresult_velocity

+ 10 - 10
raster3d/r3.out.vtk/r3.out.vtk.html

@@ -75,10 +75,10 @@ the default region).
 <div class="code"><pre>
 <div class="code"><pre>
 g.region -d
 g.region -d
 g.region res=150 res3=150 t=80 b=0 tbres=10
 g.region res=150 res3=150 t=80 b=0 tbres=10
-r.mapcalc "bottom=1800. - elevation.10m"
+r.mapcalc "bottom = 1800. - elevation.10m"
 
 
 # synthetic data, could be geological structures:
 # synthetic data, could be geological structures:
-r3.mapcalc "map3d=row()+col()+depth()"
+r3.mapcalc "map3d = row()+col()+depth()"
 
 
 #export of volume to VTK:
 #export of volume to VTK:
 r3.out.vtk -s input=map3d top=elevation.10m bottom=bottom output=/tmp/out.vtk
 r3.out.vtk -s input=map3d top=elevation.10m bottom=bottom output=/tmp/out.vtk
@@ -95,10 +95,10 @@ g.region -d
 g.region n=4926970 s=4914857 w=591583 e=607793 res=50 res3=50 t=80 b=0 tbres=10
 g.region n=4926970 s=4914857 w=591583 e=607793 res=50 res3=50 t=80 b=0 tbres=10
 
 
 #create a bottom surface
 #create a bottom surface
-r.mapcalc "bottom=1800. - elevation.10m"
+r.mapcalc "bottom = 1800. - elevation.10m"
 
 
 # synthetic data, could be geological structures:
 # synthetic data, could be geological structures:
-r3.mapcalc "map3d=row()+col()+depth()"
+r3.mapcalc "map3d = row()+col()+depth()"
 
 
 #get some satellite images with r.in.onearth
 #get some satellite images with r.in.onearth
 r.in.onearth -l output=Sat tmband=Red
 r.in.onearth -l output=Sat tmband=Red
@@ -125,15 +125,15 @@ g.region -d
 g.region n=4926970 s=4914857 w=591583 e=607793 res=50 res3=50 t=80 b=0 tbres=10
 g.region n=4926970 s=4914857 w=591583 e=607793 res=50 res3=50 t=80 b=0 tbres=10
 
 
 # create a bottom surface
 # create a bottom surface
-r.mapcalc "bottom=1800. - elevation.10m"
+r.mapcalc "bottom = 1800. - elevation.10m"
 
 
 # synthetic data, could be geological structures:
 # synthetic data, could be geological structures:
-r3.mapcalc "map3d=row()+col()+depth()"
+r3.mapcalc "map3d = row()+col()+depth()"
 
 
 # synthetic vector data, could be groundwater stream vectors
 # synthetic vector data, could be groundwater stream vectors
-r3.mapcalc "x_part =sin(row())"
-r3.mapcalc "y_part =cos(col())"
-r3.mapcalc "z_part =sin(depth())"
+r3.mapcalc "x_part = sin(row())"
+r3.mapcalc "y_part = cos(col())"
+r3.mapcalc "z_part = sin(depth())"
 
 
 
 
 # export the stuff data to VTK:
 # export the stuff data to VTK:
@@ -150,7 +150,7 @@ paraview --data=/tmp/out.vtk
 <div class="code"><pre>
 <div class="code"><pre>
 #reduce resolution:
 #reduce resolution:
 g.region -dp3 res=1000 res3=1000
 g.region -dp3 res=1000 res3=1000
-r.mapcalc "bottom=100"
+r.mapcalc "bottom = 100"
 
 
 #export of volume to VTK:
 #export of volume to VTK:
 r3.out.vtk -s in=precip3d.500z50 top=dem500 bottom=bottom out=/tmp/slovakia3d.vtk
 r3.out.vtk -s in=precip3d.500z50 top=dem500 bottom=bottom out=/tmp/slovakia3d.vtk

+ 1 - 1
vector/v.hull/v.hull.html

@@ -27,7 +27,7 @@ Example of <em>v.hull</em> output:
 Example of <em>v.hull</em> 3D output (using two random 3D point clouds):
 Example of <em>v.hull</em> 3D output (using two random 3D point clouds):
 <div class="code"><pre>
 <div class="code"><pre>
 g.region rural_1m -p
 g.region rural_1m -p
-r.mapcalc zero=0
+r.mapcalc "zero = 0"
 v.random -z out=random3d_a n=10 zmin=0 zmax=200
 v.random -z out=random3d_a n=10 zmin=0 zmax=200
 v.random -z out=random3d_b n=15 zmin=400 zmax=600
 v.random -z out=random3d_b n=15 zmin=400 zmax=600
 v.hull random3d_a out=random3d_a_hull
 v.hull random3d_a out=random3d_a_hull