[GRASS-SVN] r54708 - grass/trunk/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 19 05:39:27 PST 2013


Author: martinl
Date: 2013-01-19 05:39:26 -0800 (Sat, 19 Jan 2013)
New Revision: 54708

Modified:
   grass/trunk/lib/vector/Vlib/build.c
Log:
vlib: improve doxygen docs for Vect_topo_check()


Modified: grass/trunk/lib/vector/Vlib/build.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build.c	2013-01-19 09:29:05 UTC (rev 54707)
+++ grass/trunk/lib/vector/Vlib/build.c	2013-01-19 13:39:26 UTC (rev 54708)
@@ -574,8 +574,12 @@
 /*!
    \brief Extensive tests for correct topology
 
+   - lines or boundaries of zero length
+   - intersecting boundaries, ie. overlapping areas
+   - areas without centroids that are not isles
+
    \param Map vector map
-   \param[out] Err vector map where errors will be written
+   \param[out] Err vector map where errors will be written or NULL
 
    \return 1 on success
    \return 0 on error
@@ -587,6 +591,7 @@
     struct line_pnts *Points;
     struct line_cats *Cats;
 
+    /* rebuild topology if needed */
     if (Vect_get_built(Map) != GV_BUILD_ALL) {
 	Vect_build_partial(Map, GV_BUILD_NONE);
 	Vect_build(Map);
@@ -597,12 +602,12 @@
     Points = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
 
-    /* boundaries of zero length */
+    /* lines or boundaries of zero length */
     n_zero_lines = n_zero_boundaries = 0;
     nlines = Vect_get_num_lines(Map);
     for (line = 1; line <= nlines; line++) {
 	int type;
-	
+
 	if (!Vect_line_alive(Map, line))
 	    continue;
 	    
@@ -625,6 +630,7 @@
 	    }
 	}
     }
+    
     if (n_zero_lines)
 	G_warning(_("Number of lines of length zero: %d"), n_zero_lines);
     if (n_zero_boundaries)
@@ -639,7 +645,7 @@
     if (nerrors)
 	G_warning(_("Number of boundary intersections: %d"), nerrors);
 
-    /* areas without centroids that are not holes
+    /* areas without centroids that are not isles
      * only makes sense if all boundaries are correct */
     nerrors = 0;
     for (line = 1; line <= nlines; line++) {



More information about the grass-commit mailing list