[GRASS-SVN] r46435 - grass/trunk/vector/v.patch
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 28 12:18:21 EDT 2011
Author: mmetz
Date: 2011-05-28 09:18:20 -0700 (Sat, 28 May 2011)
New Revision: 46435
Modified:
grass/trunk/vector/v.patch/main.c
Log:
v.patch: add flag to not build topology
Modified: grass/trunk/vector/v.patch/main.c
===================================================================
--- grass/trunk/vector/v.patch/main.c 2011-05-28 16:08:45 UTC (rev 46434)
+++ grass/trunk/vector/v.patch/main.c 2011-05-28 16:18:20 UTC (rev 46435)
@@ -49,7 +49,7 @@
char *in_name, *out_name, *bbox_name;
struct GModule *module;
struct Option *old, *new, *bbox;
- struct Flag *append, *table_flag;
+ struct Flag *append, *table_flag, *no_topo;
struct Map_info InMap, OutMap, BBoxMap;
int n_files;
int do_table;
@@ -91,6 +91,11 @@
table_flag->description =
_("Only the table of layer 1 is currently supported");
+ no_topo = G_define_flag();
+ no_topo->key = 'b';
+ no_topo->description =
+ _("Do not build topology for output vector");
+
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
@@ -241,6 +246,8 @@
}
if (append->answer) {
+ if (no_topo->answer)
+ Vect_set_open_level(1);
Vect_open_update(&OutMap, out_name, G_mapset());
if (out_is_3d == WITH_Z && !Vect_is_3d(&OutMap)) {
G_warning(_("The output map is not 3D"));
@@ -354,7 +361,8 @@
Vect_set_map_name(&OutMap, "Output from v.patch");
Vect_set_person(&OutMap, G_whoami());
- Vect_build(&OutMap);
+ if (!no_topo->answer)
+ Vect_build(&OutMap);
Vect_close(&OutMap);
if (bbox_name) {
More information about the grass-commit
mailing list