[GRASS-SVN] r70543 - grass/trunk/imagery/i.ortho.photo/i.ortho.photo

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 12 12:25:42 PST 2017


Author: ychemin
Date: 2017-02-12 12:25:42 -0800 (Sun, 12 Feb 2017)
New Revision: 70543

Modified:
   grass/trunk/imagery/i.ortho.photo/i.ortho.photo/menu.c
Log:
Added option to run g.gui.iphoto2image

Modified: grass/trunk/imagery/i.ortho.photo/i.ortho.photo/menu.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/i.ortho.photo/menu.c	2017-02-12 20:22:30 UTC (rev 70542)
+++ grass/trunk/imagery/i.ortho.photo/i.ortho.photo/menu.c	2017-02-12 20:25:42 UTC (rev 70543)
@@ -63,7 +63,7 @@
                "i.ortho.target;%s;"
                "i.ortho.elev;%s;"
                "i.ortho.camera;%s;"
-               "i.photo.2image;%s;"
+               "g.gui.iphoto2image;%s;"
                "i.ortho.init;%s;"
                "i.photo.2target;%s;"
                "i.ortho.rectify;%s;",
@@ -76,7 +76,7 @@
                _("7 - Compute ortho-rectification parameters"),
                _("8 - Ortho-rectify imagery files"));
     ortho_opt->descriptions = desc_ortho_opt;
-    ortho_opt->options = "i.group,i.ortho.target,i.ortho.elev,i.ortho.camera,i.photo.2image,i.ortho.init,i.photo.2target,i.ortho.rectify";
+    ortho_opt->options = "i.group,i.ortho.target,i.ortho.elev,i.ortho.camera,g.gui.iphoto2image,i.ortho.init,i.photo.2target,i.ortho.rectify";
 
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
@@ -106,22 +106,25 @@
     grname=group.name;
     moduletorun=ortho_opt->answer;
     /* run the program chosen */
-    if (strcmp(moduletorun, "i.group") == 0)
-        strcpy(tosystem,"i.group --ui group=");
-    if (strcmp(moduletorun, "i.ortho.target") == 0)
-        strcpy(tosystem,"i.ortho.target --ui group=");
-    if (strcmp(moduletorun, "i.ortho.elev") == 0)
-        strcpy(tosystem,"i.ortho.elev --ui group=");
-    if (strcmp(moduletorun, "i.ortho.camera") == 0)
-        strcpy(tosystem,"i.ortho.camera --ui group=");
-    if (strcmp(moduletorun, "i.photo.2image") == 0)
-        strcpy(tosystem,"i.photo.2image --ui group=");
-    if (strcmp(moduletorun, "i.ortho.init") == 0)
-        strcpy(tosystem,"i.ortho.init --ui group=");
-    if (strcmp(moduletorun, "i.photo.2target") == 0)
-        strcpy(tosystem,"i.photo.2target --ui group=");
-    if (strcmp(moduletorun, "i.ortho.rectify") == 0)
-        strcpy(tosystem,"i.ortho.rectify --ui group=");
-    strcat(tosystem,grname);
-    err=system((const char *)tosystem);
+    if (strcmp(moduletorun, "g.gui.iphoto2image") == 0){
+        strcpy(tosystem,"g.gui.iphoto2image");
+    	err=system((const char *)tosystem);
+    }else{
+        if (strcmp(moduletorun, "i.group") == 0)
+            strcpy(tosystem,"i.group --ui group=");
+        if (strcmp(moduletorun, "i.ortho.target") == 0)
+            strcpy(tosystem,"i.ortho.target --ui group=");
+        if (strcmp(moduletorun, "i.ortho.elev") == 0)
+            strcpy(tosystem,"i.ortho.elev --ui group=");
+        if (strcmp(moduletorun, "i.ortho.camera") == 0)
+            strcpy(tosystem,"i.ortho.camera --ui group=");
+        if (strcmp(moduletorun, "i.ortho.init") == 0)
+            strcpy(tosystem,"i.ortho.init --ui group=");
+        if (strcmp(moduletorun, "i.photo.2target") == 0)
+            strcpy(tosystem,"i.photo.2target --ui group=");
+        if (strcmp(moduletorun, "i.ortho.rectify") == 0)
+            strcpy(tosystem,"i.ortho.rectify --ui group=");
+        strcat(tosystem,grname);
+        err=system((const char *)tosystem);
+    }
 }



More information about the grass-commit mailing list