[GRASS-SVN] r61987 - grass/branches/releasebranch_6_4/vector/v.distance
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 15 23:32:06 PDT 2014
Author: mmetz
Date: 2014-09-15 23:32:06 -0700 (Mon, 15 Sep 2014)
New Revision: 61987
Modified:
grass/branches/releasebranch_6_4/vector/v.distance/main.c
Log:
v.distance: fix #2419
Modified: grass/branches/releasebranch_6_4/vector/v.distance/main.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.distance/main.c 2014-09-16 02:31:21 UTC (rev 61986)
+++ grass/branches/releasebranch_6_4/vector/v.distance/main.c 2014-09-16 06:32:06 UTC (rev 61987)
@@ -692,6 +692,10 @@
area = List->value[i];
G_debug(4, "%d: area %d", i, area);
+
+ if (Vect_get_area_centroid(&To, area) == 0)
+ continue;
+
Vect_get_area_points(&To, area, TPoints);
/* Find the distance to this area */
@@ -736,12 +740,6 @@
FPoints->z[0]);
Vect_append_point(LLPoints, tmp_tx, tmp_ty, tmp_tz);
tmp_dist = Vect_line_geodesic_length(LLPoints);
- Vect_reset_line(LLPoints);
- for (k = 0; k < tseg; k++)
- Vect_append_point(LLPoints, TPoints->x[k],
- TPoints->y[k], TPoints->z[k]);
- Vect_append_point(LLPoints, tmp_tx, tmp_ty, tmp_tz);
- tmp_talong = Vect_line_geodesic_length(LLPoints);
}
/* TODO: all cats of given field ? */
More information about the grass-commit
mailing list