[GRASS-SVN] r59618 - grass/branches/develbranch_6/vector/v.to.db

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 7 01:04:44 PDT 2014


Author: mmetz
Date: 2014-04-07 01:04:44 -0700 (Mon, 07 Apr 2014)
New Revision: 59618

Modified:
   grass/branches/develbranch_6/vector/v.to.db/areas.c
Log:
v.to.db: fix perimeter

Modified: grass/branches/develbranch_6/vector/v.to.db/areas.c
===================================================================
--- grass/branches/develbranch_6/vector/v.to.db/areas.c	2014-04-07 03:44:12 UTC (rev 59617)
+++ grass/branches/develbranch_6/vector/v.to.db/areas.c	2014-04-07 08:04:44 UTC (rev 59618)
@@ -40,7 +40,14 @@
 	if ((options.option == O_COMPACT) || (options.option == O_FD) ||
 	    (options.option == O_PERIMETER)) {
 	    Vect_get_area_points(Map, area_num, Ppoints);
+	    Vect_line_prune(Ppoints);
 	    perimeter = Vect_line_geodesic_length(Ppoints);
+	    for (i = 0; i < Vect_get_area_num_isles(Map, area_num); i++) {
+		Vect_get_isle_points(Map, Vect_get_area_isle(Map, area_num, i),
+		                     Ppoints);
+		Vect_line_prune(Ppoints);
+		perimeter += Vect_line_geodesic_length(Ppoints);
+	    }
 	}
 
 	found = 0;



More information about the grass-commit mailing list