[GRASS-SVN] r58925 - grass/branches/develbranch_6/raster/r.li/r.li.setup

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Feb 6 23:34:20 PST 2014


Author: hamish
Date: 2014-02-06 23:34:20 -0800 (Thu, 06 Feb 2014)
New Revision: 58925

Modified:
   grass/branches/develbranch_6/raster/r.li/r.li.setup/description.html
   grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.setup.main
   grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.setup.procedures.tcl
   grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.windows.tcl
Log:
wording and spelling,
better explain radiobutton descriptions,
fix g.region message parsing bug,
make circular mask raster name special.


Modified: grass/branches/develbranch_6/raster/r.li/r.li.setup/description.html
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.setup/description.html	2014-02-07 06:52:13 UTC (rev 58924)
+++ grass/branches/develbranch_6/raster/r.li/r.li.setup/description.html	2014-02-07 07:34:20 UTC (rev 58925)
@@ -34,7 +34,7 @@
   </ul>
 
   <li> Moving window: rectagular or circular with size
-  <li> Select areas from the overlayed vector map (for details see below)
+  <li> Select areas from the overlaid vector map (for details see below)
 </ul>
 
 <img src="sampleAreas.jpg" alt="Sampling area definition">
@@ -127,7 +127,7 @@
 	 circular area, it is moved over all the raster increasing only
 	 of a cell for every move(in columns if possible, if not in rows). 
 	 It produces a new raster containing the result of all analysis.
-	   <li><em>Select areas from the overlayed vector map</em>: 
+	   <li><em>Select areas from the overlaid vector map</em>: 
 	 the sample areas are defined by the vector map selected above.
 	 For every cat in vector map, the procedure prompts the 
 	 user if he wants to include it as sample area.

Modified: grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.setup.main
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.setup.main	2014-02-07 06:52:13 UTC (rev 58924)
+++ grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.setup.main	2014-02-07 07:34:20 UTC (rev 58925)
@@ -89,13 +89,13 @@
 	pack $widget.samplingArea.choice
 	set selection ""
 	radiobutton $widget.samplingArea.choice.whole -text "Whole map layer" -relief flat -variable selection -value whole -width 40 -anchor w 
-	radiobutton $widget.samplingArea.choice.regions -text "Regions" -relief flat -variable selection -value regions -width 40 -anchor w
-	radiobutton $widget.samplingArea.choice.units -text "Sample units" -relief flat -variable selection -value units -width 40 -anchor w
+	radiobutton $widget.samplingArea.choice.regions -text "Regions (digitize polygons with mouse)" -relief flat -variable selection -value regions -width 40 -anchor w
+	radiobutton $widget.samplingArea.choice.units -text "Sample units (digitize box or circular areas\nwith mouse or define using keyboard)" -relief flat -variable selection -value units -width 40 -anchor w
 	radiobutton $widget.samplingArea.choice.window -text "Moving window" -relief flat -variable selection -value window -width 40 -anchor w
 	set vectorAreas [exec cat $env(TMP).set | grep "SAMPLINGFRAME" | tail -n 1 | cut -f2 -d " "]
 	if { $vectorAreas == "0|0|1|1"} then {
-		#inserting select areas from the overlayed vector map
-		radiobutton $widget.samplingArea.choice.vector -text "Select areas from the overlayed vector map" -relief flat -variable selection -value vector -width 40 -anchor w
+		#inserting select areas from the overlaid vector map
+		radiobutton $widget.samplingArea.choice.vector -text "Select areas from the overlaid vector map" -relief flat -variable selection -value vector -width 40 -anchor w
 		pack $widget.samplingArea.choice.whole $widget.samplingArea.choice.regions $widget.samplingArea.choice.units $widget.samplingArea.choice.window $widget.samplingArea.choice.vector
 	} else {
 		pack $widget.samplingArea.choice.whole $widget.samplingArea.choice.regions $widget.samplingArea.choice.units $widget.samplingArea.choice.window
@@ -239,7 +239,7 @@
 	frame $widget.newUni.button
 	pack $widget.newUni.button -side left -anchor w 
 	#buttons
-	button $widget.newUni.button.b2 -text " Use keyboard to enter sampling units dimension " -width 50 -command {
+	button $widget.newUni.button.b2 -text " Use keyboard to define sampling units dimension " -width 50 -command {
 		 setKeyboardUnit 
 		 $setSampleUnits.newUni.button.b2 configure -state disabled
 		 $setSampleUnits.newUni.button.b3 configure -state disabled
@@ -273,7 +273,7 @@
 	frame $widget.newWin.button
 	pack $widget.newWin.button -side left -anchor w 
 	#buttons
-	button $widget.newWin.button.b2 -text " Use keyboard to enter moving window dimension " -width 50 -command {
+	button $widget.newWin.button.b2 -text " Use keyboard to define moving window dimension " -width 50 -command {
 		 setKeyboardWindow 
 		 $setMovWindow.newWin.button.b2 configure -state disabled
 		 $setMovWindow.newWin.button.b3 configure -state disabled

Modified: grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.setup.procedures.tcl
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.setup.procedures.tcl	2014-02-07 06:52:13 UTC (rev 58924)
+++ grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.setup.procedures.tcl	2014-02-07 07:34:20 UTC (rev 58925)
@@ -266,30 +266,30 @@
 		nonoverlapping {
 			toplevel .dialog
 			wm title .dialog " Random Nonoverlapping "
-			wm minsize .dialog 300 150
+			wm minsize .dialog 300 100
 
 			frame .dialog.scale
 			pack .dialog.scale
-			label .dialog.scale.label1 -text " What number of Sampling Units to use?"
+			label .dialog.scale.label1 -text "\n How many Sampling Units to use?"
 			entry .dialog.scale.e1 -width 5 -textvariable number1
-			grid .dialog.scale.label1 .dialog.scale.e1   -padx 3
+			grid .dialog.scale.label1 .dialog.scale.e1  -padx 3
 
 			button .dialog.button -text " Ok " -command {
 				if  { $number1!="" && ![catch { exec printf %i $number1 }]} then {
 					exec echo "RANDOMNONOVERLAPPING $number1" >> $env(TMP).set
-					tk_messageBox -message "Sampling units distribuition set as Random Nonoverlapping" -type ok
+					tk_messageBox -message "Sampling units distribuition set to Random Nonoverlapping" -type ok
 					set number1 ""
 					destroy .dialog
 				} else {
 					tk_messageBox -message "Please type integer value" -type ok -icon error
 				}
 			}
-			pack .dialog.button
+			pack .dialog.button -pady 3
 		}
 
 		contiguous {
 			exec echo "SYSTEMATICCONTIGUOUS " >> $env(TMP).set
-			tk_messageBox -message "Sampling units distribuition set as Systematic Contiguous" -type ok
+			tk_messageBox -message "Sampling units distribuition set to Systematic Contiguous" -type ok
 		}
 
 		noncontiguous {
@@ -306,7 +306,7 @@
 	       		button .dialog.button -text " Ok " -command {
 			if  { $number1!="" && ![catch { exec printf %i $number1 }]} then {
 				exec echo "SYSTEMATICNONCONTIGUOUS $number1" >> $env(TMP).set
-				tk_messageBox -message "Sampling units distribuition set as Systematic Non Contiguous" -type ok
+				tk_messageBox -message "Sampling units distribuition set to Systematic Non Contiguous" -type ok
 				set number1 ""
 				destroy .dialog
 			} else {
@@ -336,7 +336,7 @@
 	       		button .dialog.button -text " Ok " -command {
 			if  { $number1!="" && $number2!="" && ![catch { exec printf %i%i $number1 $number2 }]} then {
 				exec echo "STRATIFIEDRANDOM $number1|$number2" >> $env(TMP).set
-				tk_messageBox -message "Sampling units distribuition set as Stratified random" -type ok
+				tk_messageBox -message "Sampling units distribuition set to Stratified random" -type ok
 				set number1 ""
 				destroy .dialog
 			} else {
@@ -653,8 +653,8 @@
 	set southEdge [expr double($env(SF_N) - ($ycell * $env(SF_NSRES)))]
 	#restrict region
 	exec g.region n=$env(SF_N) s=$southEdge e=$easthEdge w=$env(SF_W)
-	set xcenter [exec g.region -c | grep "region center easting:" | cut -f2 -d: | tr -d " "]
-	set ycenter [exec g.region -c | grep "region center northing:" | cut -f2 -d: | tr -d " "]
+	set xcenter [exec g.region -c | grep "center easting:" | cut -f2 -d: | tr -d " "]
+	set ycenter [exec g.region -c | grep "center northing:" | cut -f2 -d: | tr -d " "]
 	#debug line
 	#tk_messageBox -message "$xcenter , $ycenter $env(SF_N) $southEdge $env(SF_W) $easthEdge"
 	#creating circle

Modified: grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.windows.tcl
===================================================================
--- grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.windows.tcl	2014-02-07 06:52:13 UTC (rev 58924)
+++ grass/branches/develbranch_6/raster/r.li/r.li.setup/r.li.windows.tcl	2014-02-07 07:34:20 UTC (rev 58925)
@@ -153,7 +153,7 @@
 	label .kUni.scale.label4 -text " What radius size (in meters) for each sampling unit?" -state disabled
 	entry .kUni.scale.e4 -width 5 -textvariable number4 -state disabled
 	grid .kUni.scale.label4 .kUni.scale.e4 -pady 20 -padx 3
-	label .kUni.scale.label5 -text " Name for the circle mask" -state disabled
+	label .kUni.scale.label5 -text " Name for the circle mask raster map" -state disabled
 	entry .kUni.scale.e5 -width 15 -textvariable maskname -state disabled 
 	grid .kUni.scale.label5 .kUni.scale.e5  -padx 3
 	
@@ -196,6 +196,7 @@
 				#check if we have integers
 				tk_messageBox -message "Type integer values or set raster map name" -type ok -icon error
 			} else {
+				set maskname "rli_circlemask_$maskname"
 				circleMask $number4 $maskname
 				defineSamplingUnits $selec $env(CIR_RL) $env(CIR_RL) $maskname
 				if { $selec != "sites" } then {
@@ -393,7 +394,7 @@
 		label .load.info.l1 -text "The sampling areas are defined only for $rname file"
 		pack .load.info.l1
 		set vname [exec cat $filename | grep "VECTORMAP " | cut -f2 -d\ ]
-		label .load.info.l2 -text "The overlayed vector file is $vname"
+		label .load.info.l2 -text "The overlaid vector file is $vname"
 		pack .load.info.l2
 	} else {
 		#extract sample areas



More information about the grass-commit mailing list