#2264 closed defect (fixed)
t.rast.univar fails when r.univar fails
Reported by: | martinl | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.0 |
Component: | Temporal | Version: | svn-trunk |
Keywords: | t.rast.univar, r.univar | Cc: | |
CPU: | Unspecified | Platform: | Unspecified |
Description
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@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.
Attachments (1)
Change History (5)
by , 11 years ago
Attachment: | univar.diff added |
---|
follow-up: 3 comment:1 by , 11 years ago
follow-up: 4 comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
For the record, patch was included in r59916. So the original bug is fixed.
comment:3 by , 11 years ago
Replying to neteler:
Replying to martinl:
r.univar terra_lst_day20020206 --qno output printed. It should fail or better to print 'nan' values.
The issue is in r.univar, stats.c line 123. However, not that easy to fix since sometimes zones are consideres, sometimes not.
(r.univar issue continued in bug #2269)
comment:4 by , 11 years ago
Note:
See TracTickets
for help on using tickets.
Replying to martinl:
The issue is in r.univar, stats.c line 123. However, not that easy to fix since sometimes zones are consideres, sometimes not.