2
/****************************************************************************
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>
12
* PURPOSE: Select target location and mapset
13
* COPYRIGHT: (C) 1999-2008 by the GRASS Development Team
15
* This program is free software under the GNU General Public
16
* License (>=v2). Read the file COPYING that comes with GRASS
19
*****************************************************************************/
24
#include <grass/gis.h>
25
#include <grass/imagery.h>
26
#include <grass/glocale.h>
27
#include "orthophoto.h"
28
#include "local_proto.h"
30
int main(int argc, char *argv[])
32
struct GModule *module;
33
struct Option *group_opt;
35
char location[GMAPSET_MAX];
36
char mapset[GMAPSET_MAX];
37
char group[GNAME_MAX];
40
/* must run in a term window */
41
G_putenv("GRASS_UI_TERM", "1");
45
module = G_define_module();
46
module->keywords = _("imagery, orthorectify");
48
_("Interactively select or modify the imagery group target.");
50
group_opt = G_define_standard_option(G_OPT_I_GROUP);
51
group_opt->description =
52
_("Name of imagery group for ortho-rectification");
54
if (G_parser(argc, argv))
58
strcpy(group, group_opt->answer);
60
I_get_target(group, location, mapset);
62
ask_target(group, location, mapset);
64
I_put_target(group, location, mapset);
66
G_message(_("Group [%s] targeted for location [%s], mapset [%s]"),
67
group, location, mapset);