[GRASS-SVN] r70477 - grass/trunk/imagery/i.zc
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Feb 2 08:59:40 PST 2017
Author: mlennert
Date: 2017-02-02 08:59:40 -0800 (Thu, 02 Feb 2017)
New Revision: 70477
Modified:
grass/trunk/imagery/i.zc/i.zc.html
grass/trunk/imagery/i.zc/main.c
Log:
i.zc: threshold was not read correctly and had no effect
Modified: grass/trunk/imagery/i.zc/i.zc.html
===================================================================
--- grass/trunk/imagery/i.zc/i.zc.html 2017-02-02 15:41:19 UTC (rev 70476)
+++ grass/trunk/imagery/i.zc/i.zc.html 2017-02-02 16:59:40 UTC (rev 70477)
@@ -34,7 +34,7 @@
<p>
The <b>threshold=</b> parameter determines the "sensitivity" of the
-Gaussian filter. The default value is <b>10</b>; higher and
+Gaussian filter. The default value is <b>0.01</b>; higher and
lower values can be tested by the user. Increasing the
threshold value will result in fewer edges being found.
Modified: grass/trunk/imagery/i.zc/main.c
===================================================================
--- grass/trunk/imagery/i.zc/main.c 2017-02-02 15:41:19 UTC (rev 70476)
+++ grass/trunk/imagery/i.zc/main.c 2017-02-02 16:59:40 UTC (rev 70477)
@@ -86,7 +86,7 @@
threshold->required = NO;
threshold->multiple = NO;
threshold->description = _("Sensitivity of Gaussian filter");
- threshold->answer = "10";
+ threshold->answer = "0.01";
orientations = G_define_option();
orientations->key = "orientations";
@@ -103,10 +103,9 @@
/* open input cell map */
inputfd = Rast_open_old(input_map->answer, "");
- sscanf(threshold->answer, "%1lf", &Thresh);
+ Thresh = atof(threshold->answer);
if (Thresh <= 0.0)
G_fatal_error(_("Threshold less than or equal to zero not allowed"));
- Thresh /= 100.0;
sscanf(width->answer, "%f", &Width);
More information about the grass-commit
mailing list