[GRASS-SVN] r70614 - grass/trunk/vector/v.distance

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 18 01:52:36 PST 2017


Author: hcho
Date: 2017-02-18 01:52:36 -0800 (Sat, 18 Feb 2017)
New Revision: 70614

Modified:
   grass/trunk/vector/v.distance/main.c
Log:
v.distance: Don't create (0,0) points where no nearest points are found

Modified: grass/trunk/vector/v.distance/main.c
===================================================================
--- grass/trunk/vector/v.distance/main.c	2017-02-18 08:59:26 UTC (rev 70613)
+++ grass/trunk/vector/v.distance/main.c	2017-02-18 09:52:36 UTC (rev 70614)
@@ -1396,7 +1396,7 @@
 	    G_percent(i, count, 1);
 
 	/* Write line connecting nearest points */
-	if (Outp != NULL) {
+	if (Near[i].count > 0 && Outp != NULL) {
 	    Vect_reset_line(FPoints);
 	    Vect_reset_cats(FCats);
 



More information about the grass-commit mailing list