[GRASS-SVN] r59599 - grass/branches/releasebranch_6_4/vector/v.to.db
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Apr 6 02:39:51 PDT 2014
Author: mmetz
Date: 2014-04-06 02:39:51 -0700 (Sun, 06 Apr 2014)
New Revision: 59599
Modified:
grass/branches/releasebranch_6_4/vector/v.to.db/areas.c
Log:
v.to.db: fix perimeter
Modified: grass/branches/releasebranch_6_4/vector/v.to.db/areas.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.to.db/areas.c 2014-04-06 09:17:47 UTC (rev 59598)
+++ grass/branches/releasebranch_6_4/vector/v.to.db/areas.c 2014-04-06 09:39:51 UTC (rev 59599)
@@ -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