[GRASS-SVN] r59085 - grass/trunk/raster/r.li/r.li.edgedensity

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Feb 18 06:39:59 PST 2014


Author: mmetz
Date: 2014-02-18 06:39:58 -0800 (Tue, 18 Feb 2014)
New Revision: 59085

Modified:
   grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c
Log:
r.li.edgedensity: update rli mask handling

Modified: grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c
===================================================================
--- grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c	2014-02-18 14:06:07 UTC (rev 59084)
+++ grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c	2014-02-18 14:39:58 UTC (rev 59085)
@@ -164,8 +164,8 @@
 	}
 
 	for (i = 0; i < ad->cl; i++) {
-	    mask_corr[i + ad->x] = 0;
-	    mask_sup[i + ad->x] = 0;
+	    mask_corr[i] = 0;
+	    mask_sup[i] = 0;
 	}
 
 	if (read(mask_fd, mask_inf, (ad->cl * sizeof(int))) < 0) {
@@ -220,7 +220,7 @@
 		int z = 0;
 
 		for (z = 0; z < ad->cl; z++)
-		    mask_inf[z + ad->x] = 0;
+		    mask_inf[z] = 0;
 	    }
 	}
 
@@ -422,8 +422,8 @@
 	}
 
 	for (i = 0; i < ad->cl; i++) {
-	    mask_corr[i + ad->x] = 0;
-	    mask_sup[i + ad->x] = 0;
+	    mask_corr[i] = 0;
+	    mask_sup[i] = 0;
 	}
 
 	if (read(mask_fd, mask_inf, (ad->cl * sizeof(int))) <= 0) {
@@ -479,7 +479,7 @@
 		int z = 0;
 
 		for (z = 0; z < ad->cl; z++)
-		    mask_inf[z + ad->x] = 0;
+		    mask_inf[z] = 0;
 	    }
 	}
 
@@ -513,7 +513,7 @@
 		else
 		    infCell = buf_inf[i + ad->x];
 
-		/* calculate how many edge the cell has */
+		/* calculate how many edges the cell has */
 
 		if ((Rast_is_null_value(&prevCell, DCELL_TYPE)) ||
 		    (corrCell != prevCell)) {
@@ -680,8 +680,8 @@
 	}
 
 	for (i = 0; i < ad->cl; i++) {
-	    mask_corr[i + ad->x] = 0;
-	    mask_sup[i + ad->x] = 0;
+	    mask_corr[i] = 0;
+	    mask_sup[i] = 0;
 	}
 
 	if (read(mask_fd, mask_inf, (ad->cl * sizeof(int))) <= 0) {
@@ -735,7 +735,7 @@
 		int z = 0;
 
 		for (z = 0; z < ad->cl; z++)
-		    mask_inf[z + ad->x] = 0;
+		    mask_inf[z] = 0;
 	    }
 	}
 



More information about the grass-commit mailing list