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

« back to all changes in this revision

Viewing changes to imagery/i.ortho.photo/i.photo.target/main.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
 
 
2
 
/****************************************************************************
3
 
 *
4
 
 * MODULE:       i.photo.target
5
 
 * AUTHOR(S):    Mike Baba,  DBA Systems, Inc. (original contributor)
6
 
 *               Markus Neteler <neteler itc.it>,
7
 
 *               Roberto Flor <flor itc.it>, 
8
 
 *               Bernhard Reiter <bernhard intevation.de>, 
9
 
 *               Glynn Clements <glynn gclements.plus.com>
10
 
 *               Hamish Bowman
11
 
 *
12
 
 * PURPOSE:      Select target location and mapset
13
 
 * COPYRIGHT:    (C) 1999-2008 by the GRASS Development Team
14
 
 *
15
 
 *               This program is free software under the GNU General Public
16
 
 *               License (>=v2). Read the file COPYING that comes with GRASS
17
 
 *               for details.
18
 
 *
19
 
 *****************************************************************************/
20
 
 
21
 
#include <stdlib.h>
22
 
#include <stdio.h>
23
 
#include <string.h>
24
 
#include <grass/gis.h>
25
 
#include <grass/imagery.h>
26
 
#include <grass/glocale.h>
27
 
#include "orthophoto.h"
28
 
#include "local_proto.h"
29
 
 
30
 
int main(int argc, char *argv[])
31
 
{
32
 
    struct GModule *module;
33
 
    struct Option *group_opt;
34
 
 
35
 
    char location[GMAPSET_MAX];
36
 
    char mapset[GMAPSET_MAX];
37
 
    char group[GNAME_MAX];
38
 
 
39
 
 
40
 
    /* must run in a term window */
41
 
    G_putenv("GRASS_UI_TERM", "1");
42
 
 
43
 
    G_gisinit(argv[0]);
44
 
 
45
 
    module = G_define_module();
46
 
    module->keywords = _("imagery, orthorectify");
47
 
    module->description =
48
 
        _("Interactively select or modify the imagery group target.");
49
 
 
50
 
    group_opt = G_define_standard_option(G_OPT_I_GROUP);
51
 
    group_opt->description =
52
 
        _("Name of imagery group for ortho-rectification");
53
 
 
54
 
    if (G_parser(argc, argv))
55
 
        exit(EXIT_FAILURE);
56
 
 
57
 
 
58
 
    strcpy(group, group_opt->answer);
59
 
 
60
 
    I_get_target(group, location, mapset);
61
 
    G__create_alt_env();
62
 
    ask_target(group, location, mapset);
63
 
    G__switch_env();
64
 
    I_put_target(group, location, mapset);
65
 
 
66
 
    G_message(_("Group [%s] targeted for location [%s], mapset [%s]"),
67
 
            group, location, mapset);
68
 
 
69
 
    exit(EXIT_SUCCESS);
70
 
}