[GRASS-SVN] r47160 - grass/trunk/raster/r.texture

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jul 18 12:45:45 EDT 2011


Author: mmetz
Date: 2011-07-18 09:45:45 -0700 (Mon, 18 Jul 2011)
New Revision: 47160

Modified:
   grass/trunk/raster/r.texture/h_measure.c
   grass/trunk/raster/r.texture/r.texture.html
Log:
remove statement with no effect and array indices out of bounds

Modified: grass/trunk/raster/r.texture/h_measure.c
===================================================================
--- grass/trunk/raster/r.texture/h_measure.c	2011-07-18 14:53:41 UTC (rev 47159)
+++ grass/trunk/raster/r.texture/h_measure.c	2011-07-18 16:45:45 UTC (rev 47160)
@@ -868,7 +868,6 @@
 		SWAP(a[i][j], a[m][j])
 		    for (j = 1; j <= n; j++)
 		    SWAP(a[j][i], a[j][m])
-			a[j][i] = a[j][i];
 	}
 	if (x) {
 	    for (i = m + 1; i <= n; i++) {

Modified: grass/trunk/raster/r.texture/r.texture.html
===================================================================
--- grass/trunk/raster/r.texture/r.texture.html	2011-07-18 14:53:41 UTC (rev 47159)
+++ grass/trunk/raster/r.texture/r.texture.html	2011-07-18 16:45:45 UTC (rev 47160)
@@ -5,6 +5,9 @@
 based on spatial dependence matrices at 0, 45, 90, and 135 
 degrees for a <em>distance</em> (default = 1).
 <p>
+<em>r.texture</em> assumes grey levels ranging from 0 to 255 as input. 
+The input is rescaled to 0 to 255 if needed.
+<p>
 In general, several variables constitute texture: differences in grey level values,
 coarseness as scale of grey level differences, presence or lack of directionality
 and regular patterns.
@@ -94,7 +97,12 @@
 
 <div class="code"><pre>
 g.region rast=ortho_2001_t792_1m -p
-r.texture -a ortho_2001_t792_1m prefix=ortho_texture
+# set grey level color table 0% black 100% white
+r.colors ortho_2001_t792_1m color=grey
+# extract grey levels
+r.mapcalc "ortho_2001_t792_1m.greylevel = #ortho_2001_t792_1m"
+# texture analysis
+r.texture ortho_2001_t792_1m.greylevel prefix=ortho_texture -a 
 # display
 g.region n=221461 s=221094 w=638279 e=638694
 d.shadedmap drape=ortho_texture_ASM_0 rel=ortho_2001_t792_1m



More information about the grass-commit mailing list