[GRASS-dev] [GRASS GIS] #2264: t.rast.univar fails when r.univar fails
GRASS GIS
trac at osgeo.org
Wed Apr 23 11:06:37 PDT 2014
#2264: t.rast.univar fails when r.univar fails
-------------------------------------+--------------------------------------
Reporter: martinl | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Keywords: t.rast.univar, r.univar | Platform: Unspecified
Cpu: Unspecified |
-------------------------------------+--------------------------------------
t.rast.univar fails when called r.univar prints no output
{{{
Traceback (most recent call last):
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/scripts/t.rast.univar", line 67, in <module>
main()
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/scripts/t.rast.univar", line 63, in main
"strds", input, where, extended, header, fs)
File "/opt/src/grass_trunk/dist.x86_64-unknown-linux-
gnu/etc/python/grass/temporal/univar_statistics.py", line 86, in
print_gridded_dataset_univar_statistics
string += fs + str(stats["mean"]) + fs + str(stats["min"])
KeyError: 'mean'
}}}
attachment:univar.diff prints a warning
{{{
WARNING: Unable to get statistics for raster map
<terra_lst_day20020206 at modis2002lst_1>
}}}
Actually commands fail when the map contains no data:
{{{
r.info terra_lst_day20020206
...
| Range of data: min = -nan max = -nan
|
...
}}}
->
{{{
r.univar terra_lst_day20020206 --q
}}}
no output printed. It should fail or better to print 'nan' values.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2264>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list