[GRASS-SVN] r71632 - in grass/trunk/raster: . r.geomorphon r.param.scale
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Nov 3 09:43:03 PDT 2017
Author: neteler
Date: 2017-11-03 09:43:02 -0700 (Fri, 03 Nov 2017)
New Revision: 71632
Added:
grass/trunk/raster/r.geomorphon/
Removed:
grass/trunk/raster/r.geomorphon/test_rgeomorphon_NC.sh
Modified:
grass/trunk/raster/Makefile
grass/trunk/raster/r.geomorphon/main.c
grass/trunk/raster/r.geomorphon/multires.c
grass/trunk/raster/r.geomorphon/pattern.c
grass/trunk/raster/r.param.scale/r.param.scale.html
Log:
r.geomorphon: moved to trunk from Addons
Modified: grass/trunk/raster/Makefile
===================================================================
--- grass/trunk/raster/Makefile 2017-11-03 08:19:17 UTC (rev 71631)
+++ grass/trunk/raster/Makefile 2017-11-03 16:43:02 UTC (rev 71632)
@@ -23,6 +23,7 @@
r.external.out \
r.fill.dir \
r.flow \
+ r.geomorphon \
r.grow.distance \
r.gwflow \
r.his \
Modified: grass/trunk/raster/r.geomorphon/main.c
===================================================================
--- grass-addons/grass7/raster/r.geomorphon/main.c 2017-11-03 08:19:17 UTC (rev 71631)
+++ grass/trunk/raster/r.geomorphon/main.c 2017-11-03 16:43:02 UTC (rev 71632)
@@ -434,7 +434,7 @@
((FCELL *) rasters[o_variance].buffer)[col] =
variance(pattern->elevation, pattern_size);
- // used only for next four shape functions
+ /* used only for next four shape functions */
if (opt_output[o_elongation]->answer ||
opt_output[o_azimuth]->answer ||
opt_output[o_extend]->answer ||
Modified: grass/trunk/raster/r.geomorphon/multires.c
===================================================================
--- grass-addons/grass7/raster/r.geomorphon/multires.c 2017-11-03 08:19:17 UTC (rev 71631)
+++ grass/trunk/raster/r.geomorphon/multires.c 2017-11-03 16:43:02 UTC (rev 71632)
@@ -1,8 +1,5 @@
#include "local_proto.h"
-
-
-
int pattern_matching(int *pattern)
{
int n, i;
Modified: grass/trunk/raster/r.geomorphon/pattern.c
===================================================================
--- grass-addons/grass7/raster/r.geomorphon/pattern.c 2017-11-03 08:19:17 UTC (rev 71631)
+++ grass/trunk/raster/r.geomorphon/pattern.c 2017-11-03 16:43:02 UTC (rev 71632)
@@ -1,4 +1,5 @@
#include "local_proto.h"
+
/*directions
* 3|2|1
* 4|0|8
@@ -74,7 +75,7 @@
nadir_distance = cur_distance;
}
j += cell_step;
- // j++; /* go to next cell */
+ /* j++; */ /* go to next cell */
target_northing =
Rast_row_to_northing(row + j * nextr[i] + 0.5, &window);
target_easting =
@@ -124,13 +125,13 @@
fabs(nadir_angle) > nadir_threshold) {
if (fabs(nadir_angle) < fabs(zenith_angle)) {
pattern->pattern[i] = 1;
- pattern->elevation[i] = zenith_height; //ZMIANA!
+ pattern->elevation[i] = zenith_height; /* ZMIANA! */
pattern->distance[i] = zenith_distance;
pattern->num_positives++;
}
if (fabs(nadir_angle) > fabs(zenith_angle)) {
pattern->pattern[i] = -1;
- pattern->elevation[i] = nadir_height; //ZMIANA!
+ pattern->elevation[i] = nadir_height; /* ZMIANA! */
pattern->distance[i] = nadir_distance;
pattern->num_negatives++;
}
Deleted: grass/trunk/raster/r.geomorphon/test_rgeomorphon_NC.sh
===================================================================
--- grass-addons/grass7/raster/r.geomorphon/test_rgeomorphon_NC.sh 2017-11-03 08:19:17 UTC (rev 71631)
+++ grass/trunk/raster/r.geomorphon/test_rgeomorphon_NC.sh 2017-11-03 16:43:02 UTC (rev 71632)
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-# 2017, Markus Neteler
-# synthetic test case for r.geomorphon
-
-GRASSDATA=$HOME/grassdata
-
-grass72 $GRASSDATA/nc_spm_08_grass7/user1/
-
-# computational region of NC
-g.region raster=elevation -p
-
-# generate a synthetic, non-symmetric DEM
-r.mapcalc "synthetic_dem = sin(x() / 5.0) + (sin(x() / 5.0) * 100.0 + 200)"
-
-# d.mon wx0
-# d.rast synthetic_dem
-
-# calculate geomorphon forms
-r.geomorphon elevation=synthetic_dem forms=synthetic_dem_geomorph search=10
-
-# expected result:
-r.category synthetic_dem_geomorph
-#1 flat
-#3 ridge
-#4 shoulder
-#6 slope
-#8 footslope
-#9 valley
-
-
-# further visual inspection
-# d.rast synthetic_dem_geomorph
-# r.relief synthetic_dem out=synthetic_dem_shaded
-# d.shade shade=synthetic_dem_shaded color=synthetic_dem_geomorph
-
Modified: grass/trunk/raster/r.param.scale/r.param.scale.html
===================================================================
--- grass/trunk/raster/r.param.scale/r.param.scale.html 2017-11-03 08:19:17 UTC (rev 71631)
+++ grass/trunk/raster/r.param.scale/r.param.scale.html 2017-11-03 16:43:02 UTC (rev 71632)
@@ -104,11 +104,9 @@
</ul>
<h2>SEE ALSO</h2>
-<!-- not ported to GRASS 6 due to non-GPLness of numerical recipes.
-<i><a href="d.param.scale.html">d.param.scale</a></i>
--->
<em>
+ <a href="r.geomorphon.html">r.geomorphon</a>,
<a href="r.slope.aspect.html">r.slope.aspect</a>
</em>
More information about the grass-commit
mailing list