[GRASS-SVN] r31682 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 11 15:43:44 EDT 2008
Author: martinl
Date: 2008-06-11 15:43:44 -0400 (Wed, 11 Jun 2008)
New Revision: 31682
Modified:
grass/trunk/lib/vector/Vlib/build_nat.c
Log:
vlib: print number of vertices in build output (merge devbr6, r31681)
Modified: grass/trunk/lib/vector/Vlib/build_nat.c
===================================================================
--- grass/trunk/lib/vector/Vlib/build_nat.c 2008-06-11 19:42:45 UTC (rev 31681)
+++ grass/trunk/lib/vector/Vlib/build_nat.c 2008-06-11 19:43:44 UTC (rev 31682)
@@ -406,7 +406,7 @@
{
struct Plus_head *plus ;
int i, j, s, type, lineid;
- long offset;
+ long offset;
int side, line, area;
struct line_pnts *Points, *APoints;
struct line_cats *Cats;
@@ -474,6 +474,7 @@
List = Vect_new_list ();
if ( plus->built < GV_BUILD_BASE ) {
+ int npoints;
/*
* We shall go through all primitives in coor file and
* add new node for each end point to nodes structure
@@ -482,11 +483,13 @@
/* register lines, create nodes */
Vect_rewind ( Map );
- prnmsg (_("Registering lines: "));
+ prnmsg (_("Registering primitives: "));
i = 1; j = 1;
+ npoints = 0;
while ( 1 ) {
/* register line */
type = Vect_read_next_line (Map, Points, Cats);
+
/* Note: check for dead lines is not needed, because they are skipped by V1_read_next_line_nat() */
if ( type == -1 ) {
G_warning(_("Unable to read vector map"));
@@ -494,6 +497,8 @@
} else if ( type == -2 ) {
break;
}
+
+ npoints += Points->n_points;
offset = Map->head.last_offset;
@@ -523,7 +528,8 @@
}
i++; j++;
}
- prnmsg ("\r%d %s \n", plus->n_lines, _("primitives registered"));
+ prnmsg ("\r%d %s \n", npoints, _("vertices registered"));
+ prnmsg ("%d %s\n", plus->n_lines, _("primitives registered"));
plus->built = GV_BUILD_BASE;
}
More information about the grass-commit
mailing list