Trying out r.median, I discovered
GRASS 6.3.cvs (spearfish60):~/ > r.median base=fields cover=soils.Kfactor
output=K.by.farm.median --o
100%
ERROR: Reading r.stats output
I compared to r.mode: this fix seems to be necessary:
--- main.c 15 Jul 2007 12:30:37 -0000 2.9
+++ main.c 15 Jul 2007 12:48:43 -0000
@@ -79,7 +79,7 @@
if (G_read_cats (covermap, cover_mapset, &cover_cats) < 0)
G_fatal_error (_("Cannot read category labels of raster map <%s>"),
covermap);
- strcpy (command, "r.stats -a \"");
+ strcpy (command, "r.stats -an \"");
strcat (command, G_fully_qualified_name (basemap, base_mapset));
strcat (command, ",");
strcat (command, G_fully_qualified_name (covermap, cover_mapset));
Should I submit?
Markus
--
View this message in context: http://www.nabble.com/r.median-(non)functionality-tf4082074.html#a11602182
Sent from the Grass - Dev mailing list archive at Nabble.com.
Markus Neteler wrote:
Trying out r.median, I discovered
GRASS 6.3.cvs (spearfish60):~/ > r.median base=fields cover=soils.Kfactor
output=K.by.farm.median --o
100%
ERROR: Reading r.stats output
I compared to r.mode: this fix seems to be necessary:
--- main.c 15 Jul 2007 12:30:37 -0000 2.9
+++ main.c 15 Jul 2007 12:48:43 -0000
@@ -79,7 +79,7 @@
if (G_read_cats (covermap, cover_mapset, &cover_cats) < 0)
G_fatal_error (_("Cannot read category labels of raster map <%s>"), covermap);
- strcpy (command, "r.stats -a \"");
+ strcpy (command, "r.stats -an \"");
strcat (command, G_fully_qualified_name (basemap, base_mapset));
strcat (command, ",");
strcat (command, G_fully_qualified_name (covermap, cover_mapset));
Presumably r.median fails if you have any null cells?
Should I submit?
Yes.
--
Glynn Clements <glynn@gclements.plus.com>
Glynn Clements wrote:
Markus Neteler wrote:
Trying out r.median, I discovered
GRASS 6.3.cvs (spearfish60):~/ > r.median base=fields cover=soils.Kfactor
output=K.by.farm.median --o
100%
ERROR: Reading r.stats output
I compared to r.mode: this fix seems to be necessary:
...
Presumably r.median fails if you have any null cells?
No, it continues.
Should I submit?
Yes.
Done.
Markus
--
View this message in context: http://www.nabble.com/r.median-(non)functionality-tf4082074.html#a11603531
Sent from the Grass - Dev mailing list archive at Nabble.com.