Debian Codegraph @

imagery/i.ortho.photo/i.ortho.rectify/cp.c

raw symbols SCIP
1 #include <stdlib.h>
2 #include <string.h>
3 #include "global.h"
4
5 int get_conz_points(struct Ortho_Image_Group *group)
6 {
7 char msg[1024];
8
9 if (!I_get_con_points(group->name, &group->control_points))
10 group->control_points.count = 0;
11
12 snprintf(msg, sizeof(msg), _("Control Z Point file for group <%s@%s> - "),
13 group->name, G_mapset());
14
15 G_verbose_message(_("Computing equations..."));
16
17 select_target_env();
18 Compute_ortho_equation(group);
19 select_current_env();
20
21 switch (group->con_equation_stat) {
22 case -1:
23 strcat(msg, _("Poorly placed control points."));
24 strcat(msg, _(" Can not generate the transformation equation."));
25 strcat(msg, _(" Run OPTION 7 of i.ortho.photo again!\n"));
26 break;
27 case 0:
28 strcat(msg, _("No active Control Points!"));
29 strcat(msg, _(" Can not generate the transformation equation."));
30 strcat(msg, _(" Run OPTION 7 of i.ortho.photo!\n"));
31 break;
32 default:
33 return 1;
34 }
35 G_fatal_error("%s", msg);
36
37 return 0;
38 }
39
40 int get_ref_points(struct Ortho_Image_Group *group)
41 {
42 char msg[1024];
43
44 if (!I_get_ref_points(group->name, &group->photo_points))
45 exit(0);
46
47 snprintf(msg, sizeof(msg), _("Reference Point file for group <%s@%s> - "),
48 group->name, G_mapset());
49
50 Compute_ref_equation(group);
51 switch (group->ref_equation_stat) {
52 case -1:
53 strcat(msg, _("Poorly placed reference points."));
54 strcat(msg, _(" Can not generate the transformation equation."));
55 strcat(msg, _(" Run OPTION 5 of i.ortho.photo again!"));
56 break;
57
58 case 0:
59 strcat(msg, _("No active reference points."));
60 strcat(msg, _(" Can not generate the transformation equation."));
61 strcat(msg, _(" Run OPTION 5 of i.ortho.photo!"));
62 break;
63 default:
64 return 1;
65 }
66 G_fatal_error("%s", msg);
67
68 return 0;
69 }