[GRASS-SVN] r49553 - grass/trunk/vector/v.build

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Dec 5 10:54:22 EST 2011


Author: mmetz
Date: 2011-12-05 07:54:22 -0800 (Mon, 05 Dec 2011)
New Revision: 49553

Modified:
   grass/trunk/vector/v.build/main.c
Log:
add new flag for extensive topology checks

Modified: grass/trunk/vector/v.build/main.c
===================================================================
--- grass/trunk/vector/v.build/main.c	2011-12-05 15:52:16 UTC (rev 49552)
+++ grass/trunk/vector/v.build/main.c	2011-12-05 15:54:22 UTC (rev 49553)
@@ -26,6 +26,7 @@
 {
     struct GModule *module;
     struct Option *map_opt, *opt, *err_opt;
+    struct Flag *chk;
     struct Map_info Map;
     int i, build = 0, dump = 0, sdump = 0, cdump = 0;
     char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
@@ -62,6 +63,11 @@
 	  "sdump;write spatial index to stdout;"
 	  "cdump;write category index to stdout");
 
+    chk = G_define_flag();
+    chk->key = 'e';
+    chk->label = _("Extensive checks for topological errors");
+    chk->description = _("Perform in-depth checks for topological errors when building topology");
+
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
@@ -171,9 +177,14 @@
 	    }
 	}
 
+	if (chk->answer)
+	    Vect_topo_check(&Map, &Err);
+
 	Vect_build(&Err);
 	Vect_close(&Err);
     }
+    else if (chk->answer)
+	Vect_topo_check(&Map, NULL);
 
     if (build || dump || sdump || cdump) {
 	Vect_close(&Map);



More information about the grass-commit mailing list