[GRASS-SVN] r66269 - grass/trunk/vector/v.kernel
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Sep 21 08:54:50 PDT 2015
Author: neteler
Date: 2015-09-21 08:54:50 -0700 (Mon, 21 Sep 2015)
New Revision: 66269
Modified:
grass/trunk/vector/v.kernel/main.c
Log:
v.kernel: always show target raster resolution; fix dangling curly braces -Wdangling-else
Modified: grass/trunk/vector/v.kernel/main.c
===================================================================
--- grass/trunk/vector/v.kernel/main.c 2015-09-21 11:16:52 UTC (rev 66268)
+++ grass/trunk/vector/v.kernel/main.c 2015-09-21 15:54:50 UTC (rev 66269)
@@ -222,22 +222,23 @@
exit(EXIT_FAILURE);
if (net_opt->answer) {
- if (G_find_vector2(out_opt->answer, G_mapset()))
+ if (G_find_vector2(out_opt->answer, G_mapset())) {
if (overwrite)
G_warning(_("Vector map <%s> already exists and will be overwritten"),
out_opt->answer);
else
G_fatal_error(_("Vector map <%s> already exists"),
out_opt->answer);
- }
- else {
- if (G_find_raster(out_opt->answer, G_mapset()))
+ }
+ } else {
+ if (G_find_raster(out_opt->answer, G_mapset())) {
if (overwrite)
G_warning(_("Raster map <%s> already exists and will be overwritten"),
out_opt->answer);
else
G_fatal_error(_("Raster map <%s> already exists"),
out_opt->answer);
+ }
}
/*read options */
@@ -302,8 +303,13 @@
G_asprintf(&tmpstr1, n_("%d row", "%d rows", window.rows), window.rows);
G_asprintf(&tmpstr2, n_("%d column", "%d columns", window.cols), window.cols);
/* GTC First argument is resolution, second - number of rows as a text, third - number of columns as a text. */
- G_verbose_message(_("Output raster map: resolution: %f\t%s\t%s"),
+ if (G_verbose() > G_verbose_std()) {
+ G_verbose_message(_("Output raster map: resolution: %f\t%s\t%s"), /* mhh, this assumes square pixels */
window.ew_res, tmpstr1, tmpstr2);
+ } else {
+ G_message(_("Output raster map resolution: %f"), window.ew_res); /* mhh, this assumes square pixels */
+ }
+
G_free(tmpstr1);
G_free(tmpstr2);
More information about the grass-commit
mailing list