[GRASS-SVN] r44552 - grass/branches/develbranch_6/imagery/i.ortho.photo/menu

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 7 03:23:42 EST 2010


Author: mmetz
Date: 2010-12-07 00:23:41 -0800 (Tue, 07 Dec 2010)
New Revision: 44552

Modified:
   grass/branches/develbranch_6/imagery/i.ortho.photo/menu/i.photo.rectify.c
Log:
update interactive mode for i.photo.rectify

Modified: grass/branches/develbranch_6/imagery/i.ortho.photo/menu/i.photo.rectify.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.ortho.photo/menu/i.photo.rectify.c	2010-12-07 08:23:03 UTC (rev 44551)
+++ grass/branches/develbranch_6/imagery/i.ortho.photo/menu/i.photo.rectify.c	2010-12-07 08:23:41 UTC (rev 44552)
@@ -117,6 +117,40 @@
     }
     sprintf(pgm, "%s extension=%s", pgm, extension);
     
+    /* compute local camera angle */
+    G_clear_screen();
+    ok = G_yes(_("\nCompute local camera angle? "), 0);
+    if (ok) {
+	char angle_name[GNAME_MAX];
+
+	sprintf(angle_name, "%s.camera_angle", groupname);
+	
+	repeat = 1;
+	while (repeat) {
+	    repeat = 0;
+	    V_clear();
+	    V_line(1, _("Enter a name for the camera angle map:"));
+	    V_ques(angle_name, 's', 3, 0, 30);
+	    V_intrpt_ok();
+	    if (!V_call())
+		return 0;
+
+	    /* test for legal file name */
+	    if (G_legal_filename(angle_name) < 0) {
+		G_clear_screen();
+		fprintf(stderr, _("Map name <%s> is illegal"), angle_name);
+		repeat = G_yes(_("\nChoose another name? "), 1);
+		if (!repeat) {
+		    fprintf(stderr,_("Orthorectification cancelled."));
+		    G_sleep(3);
+		    return 0;
+		}
+	    }
+	    else 
+		sprintf(pgm, "%s angle=%s", pgm, angle_name);
+	}
+    }
+
     /* overwrite maps in target location/mapset */
     G_clear_screen();
     ok = G_yes(_("\nOverwrite maps in target location/mapset? "), 0);



More information about the grass-commit mailing list