[GRASS-SVN] r32823 - grass/branches/develbranch_6/gui/tcltk/gis.m

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 16 14:18:49 EDT 2008


Author: cmbarton
Date: 2008-08-16 14:18:49 -0400 (Sat, 16 Aug 2008)
New Revision: 32823

Modified:
   grass/branches/develbranch_6/gui/tcltk/gis.m/georect.tcl
Log:
Added checkbutton to clip or not clip to target region. Updated GCP notes to indicate that you need 7+ GCP's for 2nd order rectification.

Modified: grass/branches/develbranch_6/gui/tcltk/gis.m/georect.tcl
===================================================================
--- grass/branches/develbranch_6/gui/tcltk/gis.m/georect.tcl	2008-08-16 17:10:35 UTC (rev 32822)
+++ grass/branches/develbranch_6/gui/tcltk/gis.m/georect.tcl	2008-08-16 18:18:49 UTC (rev 32823)
@@ -69,10 +69,10 @@
     variable scr_ns
     variable map2scrx_conv
     variable map2scry_conv
-	variable areaX1 
-	variable areaY1 
-	variable areaX2 
-	variable areaY2
+    variable areaX1 
+    variable areaY1 
+    variable areaX2 
+    variable areaY2
 
     #variable grcoords # geographic coordinates from mouse click
     # geographic coordinates from mouse movement to display in indicator widget
@@ -135,6 +135,8 @@
     variable array rev_error
     # forward and backward projected error
     variable errorlist
+    # clip or not clip image to target region
+    variable clipregion
 
     variable gcpnum
     #forward projected rms error for GCP's, displayed in gcp manager status bar
@@ -203,6 +205,7 @@
 	set xymset ""
 	set xyvect ""
 	set drawform 0
+	set clipregion 1
 
 
 }
@@ -953,6 +956,7 @@
     variable fwd_rmserror
     variable rev_rmserror
     variable drawform
+    variable clipregion
     global xyentry
     global geoentry
     global b1coords
@@ -1014,14 +1018,20 @@
     set second [radiobutton $row.c -variable GRMap::rectorder -value 2 \
         -text [G_msg "2nd order"] -highlightthickness 0 -state $rbstate]
         DynamicHelp::register $second balloon [G_msg "polynomial transformation \
-                (rasters only). Requires 6+ GCPs."]
+                (rasters only). Requires 7+ GCPs."]
 
     set third [radiobutton $row.d -variable GRMap::rectorder -value 3 \
         -text [G_msg "3rd order"] -highlightthickness 0 -state $rbstate]
         DynamicHelp::register $third balloon [G_msg "polynomial transformation \
                 (rasters only). Requires 10+ GCPs."]
+	
+    Label $row.e -text [G_msg "Clip map/image to target region"] \
+        -fg MediumBlue
+	
+    set clip [checkbutton $row.f -takefocus 0 -variable GRMap::clipregion]
 
     pack $row.a $row.b $row.c $row.d -side left
+    pack $row.f $row.e -side right
     pack $row -side top -fill both -expand yes
 
     set row [ frame $gcp.header ]
@@ -1363,8 +1373,9 @@
 # 			puts $error
 # 		}
 
-        set cmd "i.rectify -ca group=$xygroup extension=$mappid order=$rectorder"
-        
+        set cmd "i.rectify -a group=$xygroup extension=$mappid order=$rectorder"
+        if { $GRMap::clipregion == 1 } { append cmd " -c"}
+	
         run_panel $cmd
         # Return to georectified mapset
         GRMap::resetenv



More information about the grass-commit mailing list