[GRASS-SVN] r46905 - grass/trunk/vector/v.net
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jul 1 04:56:31 EDT 2011
Author: mmetz
Date: 2011-07-01 01:56:30 -0700 (Fri, 01 Jul 2011)
New Revision: 46905
Modified:
grass/trunk/vector/v.net/connect.c
grass/trunk/vector/v.net/main.c
grass/trunk/vector/v.net/nodes.c
Log:
remove bounding boxes from vector topology (Radim's TODO): update v.net module
Modified: grass/trunk/vector/v.net/connect.c
===================================================================
--- grass/trunk/vector/v.net/connect.c 2011-07-01 08:55:08 UTC (rev 46904)
+++ grass/trunk/vector/v.net/connect.c 2011-07-01 08:56:30 UTC (rev 46905)
@@ -1,6 +1,7 @@
#include <stdlib.h>
#include <grass/gis.h>
#include <grass/vector.h>
+#include <grass/glocale.h>
#include "proto.h"
/**
@@ -59,12 +60,15 @@
WITHOUT_Z, &px, &py, &pz, &dist, &spdist,
NULL);
+ if (seg == 0)
+ G_fatal_error(_("Failed to find intersection segment"));
/* break the line */
Vect_reset_line(Pout);
for (i = 0; i < seg; i++) {
Vect_append_point(Pout, Pline->x[i], Pline->y[i], Pline->z[i]);
}
Vect_append_point(Pout, px, py, pz);
+ Vect_line_prune(Pout);
Vect_rewrite_line(Out, line, ltype, Pout, Cline);
Vect_reset_line(Pout);
@@ -72,6 +76,7 @@
for (i = seg; i < Pline->n_points; i++) {
Vect_append_point(Pout, Pline->x[i], Pline->y[i], Pline->z[i]);
}
+ Vect_line_prune(Pout);
Vect_write_line(Out, ltype, Pout, Cline);
if (dist > 0.0) {
Modified: grass/trunk/vector/v.net/main.c
===================================================================
--- grass/trunk/vector/v.net/main.c 2011-07-01 08:55:08 UTC (rev 46904)
+++ grass/trunk/vector/v.net/main.c 2011-07-01 08:56:30 UTC (rev 46905)
@@ -28,7 +28,7 @@
{
struct GModule *module;
struct opt opt;
- struct Map_info *In, *Out, *Points;
+ struct Map_info *In = NULL, *Out = NULL, *Points = NULL;
FILE *file_arcs;
Modified: grass/trunk/vector/v.net/nodes.c
===================================================================
--- grass/trunk/vector/v.net/nodes.c 2011-07-01 08:55:08 UTC (rev 46904)
+++ grass/trunk/vector/v.net/nodes.c 2011-07-01 08:56:30 UTC (rev 46905)
@@ -36,7 +36,7 @@
}
cat++;
- /* Go thorough all nodes in old map and write a new point if missing */
+ /* Go through all nodes in old map and write a new point if missing */
nnodes = Vect_get_num_nodes(In);
count = 0;
for (node = 1; node <= nnodes; node++) {
More information about the grass-commit
mailing list