60
60
G_gisinit(argv[0]);
62
62
module = G_define_module();
63
module->keywords = _("vector, projection");
64
module->description = _("Allows projection conversion of vector maps.");
63
module->keywords = _("vector, projection, transformation");
64
module->description = _("Re-projects a vector map from one location to the current location.");
66
66
/* set up the options and flags for the command line parser */
68
68
mapopt = G_define_standard_option(G_OPT_V_INPUT);
69
mapopt->gisprompt = NULL;
70
69
mapopt->required = NO;
70
mapopt->guisection = _("Source");
72
72
ilocopt = G_define_option();
73
73
ilocopt->key = "location";
74
74
ilocopt->type = TYPE_STRING;
75
75
ilocopt->required = YES;
76
76
ilocopt->description = _("Location containing input vector map");
77
ilocopt->gisprompt = "old,location,location";
78
ilocopt->key_desc = "name";
78
80
isetopt = G_define_option();
79
81
isetopt->key = "mapset";
80
82
isetopt->type = TYPE_STRING;
81
83
isetopt->required = NO;
82
84
isetopt->description = _("Mapset containing input vector map");
85
isetopt->gisprompt = "old,mapset,mapset";
86
isetopt->key_desc = "name";
87
isetopt->guisection = _("Source");
84
89
ibaseopt = G_define_option();
85
90
ibaseopt->key = "dbase";
86
91
ibaseopt->type = TYPE_STRING;
87
92
ibaseopt->required = NO;
88
93
ibaseopt->description = _("Path to GRASS database of input location");
94
ibaseopt->gisprompt = "old,dbase,dbase";
95
ibaseopt->key_desc = "path";
96
ibaseopt->guisection = _("Source");
90
98
omapopt = G_define_standard_option(G_OPT_V_OUTPUT);
91
99
omapopt->required = NO;
100
omapopt->description = _("Name for output vector map (default: input)");
101
omapopt->guisection = _("Target");
93
103
flag.list = G_define_flag();
94
104
flag.list->key = 'l';
100
110
flag.transformz->label =
101
111
_("Assume z co-ordinate is ellipsoidal height and "
102
112
"transform if possible");
113
flag.transformz->guisection = _("Target");
104
115
/* The parser checks if the map already exists in current mapset,
105
116
we switch out the check and do it
153
164
if (stat >= 0) { /* yes, we can access the mapset */
154
165
/* if requested, list the vector maps in source location - MN 5/2001 */
155
166
if (flag.list->answer) {
156
169
G_verbose_message(_("Checking location <%s> mapset <%s>"),
157
170
iloc_name, iset_name);
158
G_list_element("vector", "vector", iset_name, 0);
171
list = G_list(G_ELEMENT_VECTOR, G__getenv("GISDBASE"),
172
G__getenv("LOCATION_NAME"), iset_name);
173
for (i = 0; list[i]; i++) {
174
fprintf(stdout, "%s\n", list[i]);
159
177
exit(EXIT_SUCCESS); /* leave v.proj after listing */