[GRASS-SVN] r49842 - grass/trunk/lib/imagery
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Dec 19 14:32:02 EST 2011
Author: annakrat
Date: 2011-12-19 11:32:02 -0800 (Mon, 19 Dec 2011)
New Revision: 49842
Modified:
grass/trunk/lib/imagery/iclass_perimeter.c
Log:
imagerylib: check if areas are alive
Modified: grass/trunk/lib/imagery/iclass_perimeter.c
===================================================================
--- grass/trunk/lib/imagery/iclass_perimeter.c 2011-12-19 17:36:27 UTC (rev 49841)
+++ grass/trunk/lib/imagery/iclass_perimeter.c 2011-12-19 19:32:02 UTC (rev 49842)
@@ -70,6 +70,8 @@
nareas_cat = 0;
/* find out, how many areas have given category */
for (i = 1; i <= nareas; i++) {
+ if (!Vect_area_alive(Map, i))
+ continue;
cat = Vect_get_area_cat(Map, i, layer);
if (cat < 0) {
// no centroid, no category
@@ -88,7 +90,8 @@
j = 0; // area with cat
for (i = 1; i <= nareas; i++) {
-
+ if (!Vect_area_alive(Map, i))
+ continue;
cat = Vect_get_area_cat(Map, i, layer);
if (cat < 0) {
// no centroid, no category
More information about the grass-commit
mailing list