[GRASS-SVN] r68370 - grass-addons/grass7/raster/r.gwr
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue May 3 08:24:09 PDT 2016
Author: annakrat
Date: 2016-05-03 08:24:09 -0700 (Tue, 03 May 2016)
New Revision: 68370
Modified:
grass-addons/grass7/raster/r.gwr/main.c
Log:
r.gwr: fix estimate printing in shell script mode
Modified: grass-addons/grass7/raster/r.gwr/main.c
===================================================================
--- grass-addons/grass7/raster/r.gwr/main.c 2016-05-02 20:09:28 UTC (rev 68369)
+++ grass-addons/grass7/raster/r.gwr/main.c 2016-05-03 15:24:09 UTC (rev 68370)
@@ -184,7 +184,10 @@
if (estimate->answer) {
bw = estimate_bandwidth(mapx_fd, n_predictors, mapy_fd, rows, cols,
yest, bw);
- G_message("Estimated optimal bandwidth: %d", bw);
+ if (shell_style->answer)
+ fprintf(stdout, "estimate=%d\n", bw);
+ else
+ G_message("Estimated optimal bandwidth: %d", bw);
exit(EXIT_SUCCESS);
}
@@ -432,7 +435,7 @@
for (i = 0; i < n_predictors; i++) {
- fprintf(stdout, "\npredictor%d=%s\n", i + 1, input_mapx->answers[i]);
+ fprintf(stdout, "predictor%d=%s\n", i + 1, input_mapx->answers[i]);
Bmean[i + 1] = Bsum[i + 1] / bcount;
fprintf(stdout, "bmean%d=%g\n", i + 1, Bmean[i + 1]);
Bstddev = sqrt(Bsumsq[i + 1] / bcount - (Bmean[i + 1] * Bmean[i + 1]));
More information about the grass-commit
mailing list