[GRASS-SVN] r55643 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Apr 6 04:40:17 PDT 2013
Author: mmetz
Date: 2013-04-06 04:40:17 -0700 (Sat, 06 Apr 2013)
New Revision: 55643
Modified:
grass/trunk/lib/vector/Vlib/copy.c
Log:
Vlib: fix isle/area check
Modified: grass/trunk/lib/vector/Vlib/copy.c
===================================================================
--- grass/trunk/lib/vector/Vlib/copy.c 2013-04-06 09:58:25 UTC (rev 55642)
+++ grass/trunk/lib/vector/Vlib/copy.c 2013-04-06 11:40:17 UTC (rev 55643)
@@ -349,16 +349,18 @@
Vect_get_area_boundaries(Map, area, List);
is_isle = FALSE;
- /* do we need to check all boundaries ? */
+ /* do we need to check all boundaries ? no */
for (i = 0; i < List->n_values && !is_isle; i++) {
- line = abs(List->value[i]);
- if (1 != Vect_get_line_areas(Map, line, &left, &right))
+ line = List->value[i];
+ if (1 != Vect_get_line_areas(Map, abs(line), &left, &right))
continue;
- isle = abs(left == area ? right : left);
+ isle = line > 0 ? right : left;
- if (Vect_get_isle_area(Map, isle) > 0)
+ if (isle < 0 && Vect_get_isle_area(Map, abs(isle)) > 0) {
is_isle = TRUE;
+ break;
+ }
}
G_debug(3, "is_isle(): area %d skip? -> %s", area, is_isle ? "yes" : "no");
More information about the grass-commit
mailing list