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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 27 08:28:51 PST 2012


Author: mmetz
Date: 2012-12-27 08:28:51 -0800 (Thu, 27 Dec 2012)
New Revision: 54423

Modified:
   grass/trunk/imagery/i.ortho.photo/lib/cam_info.c
   grass/trunk/imagery/i.ortho.photo/lib/fopen_camera.c
   grass/trunk/imagery/i.ortho.photo/lib/georef.c
Log:
ortholib update

Modified: grass/trunk/imagery/i.ortho.photo/lib/cam_info.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/lib/cam_info.c	2012-12-27 16:27:50 UTC (rev 54422)
+++ grass/trunk/imagery/i.ortho.photo/lib/cam_info.c	2012-12-27 16:28:51 UTC (rev 54423)
@@ -75,13 +75,13 @@
 
     fprintf(fd, "CAMERA NAME   %s \n", cam_info->cam_name);
     fprintf(fd, "CAMERA ID     %s \n", cam_info->cam_id);
-    fprintf(fd, "CAMERA XP     %f \n", cam_info->Xp);
-    fprintf(fd, "CAMERA YP     %f \n", cam_info->Yp);
-    fprintf(fd, "CAMERA CFL    %f \n", cam_info->CFL);
+    fprintf(fd, "CAMERA XP     %.17g \n", cam_info->Xp);
+    fprintf(fd, "CAMERA YP     %.17g \n", cam_info->Yp);
+    fprintf(fd, "CAMERA CFL    %.17g \n", cam_info->CFL);
     fprintf(fd, "NUM FID       %d \n", cam_info->num_fid);
 
     for (i = 0; i < cam_info->num_fid; i++)
-	fprintf(fd, "  %5s %15f %15f \n",
+	fprintf(fd, "  %5s %.17g %.17g \n",
 		cam_info->fiducials[i].fid_id,
 		cam_info->fiducials[i].Xf, cam_info->fiducials[i].Yf);
 

Modified: grass/trunk/imagery/i.ortho.photo/lib/fopen_camera.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/lib/fopen_camera.c	2012-12-27 16:27:50 UTC (rev 54422)
+++ grass/trunk/imagery/i.ortho.photo/lib/fopen_camera.c	2012-12-27 16:28:51 UTC (rev 54423)
@@ -13,12 +13,8 @@
 FILE *I_fopen_cam_file_new(char *camera)
 {
     FILE *fd;
-    char element[100];
 
-    /* get group element name */
-    sprintf(element, "camera");
-
-    fd = G_fopen_new(element, camera);
+    fd = G_fopen_new("camera", camera);
     if (!fd)
 	error(camera, "can't create ", "");
     return fd;
@@ -27,12 +23,8 @@
 FILE *I_fopen_cam_file_append(char *camera)
 {
     FILE *fd;
-    char element[100];
 
-    /* get group element name */
-    sprintf(element, "camera/%s", camera);
-
-    fd = G_fopen_append(element, camera);
+    fd = G_fopen_append("camera", camera);
     if (!fd)
 	error(camera, "unable to open ", "");
     return fd;
@@ -41,12 +33,8 @@
 FILE *I_fopen_cam_file_old(char *camera)
 {
     FILE *fd;
-    char element[100];
 
-    /* get group element name */
-    sprintf(element, "camera");
-
-    fd = G_fopen_old(element, camera, G_mapset());
+    fd = G_fopen_old("camera", camera, G_mapset());
     if (!fd)
 	error(camera, "can't open ", "");
     return fd;

Modified: grass/trunk/imagery/i.ortho.photo/lib/georef.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/lib/georef.c	2012-12-27 16:27:50 UTC (rev 54422)
+++ grass/trunk/imagery/i.ortho.photo/lib/georef.c	2012-12-27 16:28:51 UTC (rev 54423)
@@ -2,6 +2,8 @@
 #include <signal.h>
 #include "orthophoto.h"
 
+/* TODO: replace with imagery lib I_compute_georef_equations() */
+
 static int floating_exception;
 static void catch(int);
 static double determinant(double, double, double, double, double,



More information about the grass-commit mailing list