~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to imagery/i.ortho.photo/i.photo.rectify/cp.c

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

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