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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 27 07:16:02 EDT 2011


Author: martinl
Date: 2011-10-27 04:16:02 -0700 (Thu, 27 Oct 2011)
New Revision: 48959

Modified:
   grass/trunk/lib/vector/Vlib/build.c
   grass/trunk/lib/vector/Vlib/build_nat.c
Log:
vlib: Vect_topo_dump() add separator


Modified: grass/trunk/lib/vector/Vlib/build.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build.c	2011-10-27 09:17:18 UTC (rev 48958)
+++ grass/trunk/lib/vector/Vlib/build.c	2011-10-27 11:16:02 UTC (rev 48959)
@@ -20,6 +20,7 @@
 #include <grass/glocale.h>
 #include <grass/vector.h>
 
+#define SEP "-----------------------------------\n"
 
 #ifndef HAVE_OGR
 static int format()
@@ -70,15 +71,16 @@
 
    Should only be used in special cases of vector processing.
 
-   This functions optionally builds only some parts of topology. Highest level is specified by build
-   parameter which may be:
-   - GV_BUILD_NONE - nothing is build;
-   - GV_BUILD_BASE - basic topology, nodes, spatial index;
-   - GV_BUILD_AREAS - build areas and islands, but islands are not attached to areas;
-   - GV_BUILD_ATTACH_ISLES - attach islands to areas;
-   - GV_BUILD_CENTROIDS - assign centroids to areas;
-   - GV_BUILD_ALL - top level, the same as GV_BUILD_CENTROIDS.
-
+   This functions optionally builds only some parts of
+   topology. Highest level is specified by build parameter which may
+   be:
+    - GV_BUILD_NONE - nothing is build
+    - GV_BUILD_BASE - basic topology, nodes, lines, spatial index;
+    - GV_BUILD_AREAS - build areas and islands, but islands are not attached to areas;
+    - GV_BUILD_ATTACH_ISLES - attach islands to areas;
+    - GV_BUILD_CENTROIDS - assign centroids to areas;
+    - GV_BUILD_ALL - top level, the same as GV_BUILD_CENTROIDS.
+    
    If functions is called with build lower than current value of the
    Map, the level is downgraded to requested value.
 
@@ -86,10 +88,6 @@
    Vect_delete_line() respect the last value of build used in this
    function.
 
-   Values lower than GV_BUILD_ALL are supported only by
-   GV_FORMAT_NATIVE, other formats ignore build and build always
-   GV_BUILD_ALL
-
    Note that the functions has effect only if requested level is
    higher than current level, to rebuild part of topology, call first
    downgrade and then upgrade, for example:
@@ -298,12 +296,14 @@
     plus = &(Map->plus);
     
     fprintf(out, "---------- TOPOLOGY DUMP ----------\n");
-
+    
     /* box */
     Vect_box_copy(&box, &(plus->box));
     fprintf(out, "N,S,E,W,T,B: %f, %f, %f, %f, %f, %f\n", box.N, box.S,
 	    box.E, box.W, box.T, box.B);
 
+    fprintf(out, SEP);
+    
     /* nodes */
     fprintf(out, "Nodes (%d nodes, alive + dead):\n", plus->n_nodes);
     for (i = 1; i <= plus->n_nodes; i++) {
@@ -321,6 +321,8 @@
 	}
     }
 
+    fprintf(out, SEP);
+    
     /* lines */
     fprintf(out, "Lines (%d lines, alive + dead):\n", plus->n_lines);
     for (i = 1; i <= plus->n_lines; i++) {
@@ -369,6 +371,8 @@
 	}
     }
 
+    fprintf(out, SEP);
+    
     /* areas */
     fprintf(out, "Areas (%d areas, alive + dead):\n", plus->n_areas);
     for (i = 1; i <= plus->n_areas; i++) {
@@ -391,6 +395,8 @@
 	}
     }
 
+    fprintf(out, SEP);
+    
     /* isles */
     fprintf(out, "Islands (%d islands, alive + dead):\n", plus->n_isles);
     for (i = 1; i <= plus->n_isles; i++) {
@@ -436,19 +442,20 @@
 }
 
 /*!
-   \brief Create spatial index from topology if necessary
+   \brief Create spatial index from topology if necessary (not longer
+   supported)
 
    \param Map pointer to vector map
 
-   \return 0 OK
-   \return 1 error
+   \return 1
  */
 int Vect_build_sidx_from_topo(struct Map_info *Map)
 {
 
-    G_debug(3, "Vect_build_sidx_from_topo()");
+    G_debug(3, "Vect_build_sidx_from_topo(): name=%s",
+	    Vect_get_full_name(Map));
 
-    G_warning(_("Vect_build_sidx_from_topo() is no longer supported"));
+    G_warning(_("%s is no longer supported"), "Vect_build_sidx_from_topo()");
 
     return 1;
 }

Modified: grass/trunk/lib/vector/Vlib/build_nat.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build_nat.c	2011-10-27 09:17:18 UTC (rev 48958)
+++ grass/trunk/lib/vector/Vlib/build_nat.c	2011-10-27 11:16:02 UTC (rev 48959)
@@ -24,7 +24,7 @@
 /*!
    \brief Build area on given side of line (GV_LEFT or GV_RIGHT)
 
-   \param Map_info vector map
+   \param Map pointer to Map_info structure
    \param iline line id
    \param side side (GV_LEFT or GV_RIGHT)
 



More information about the grass-commit mailing list