#115 closed enhancement (wontfix)
r.statistics: allow output to file and frequency count
Reported by: | mlennert | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.0 |
Component: | Default | Version: | svn-trunk |
Keywords: | Cc: | ||
CPU: | Unspecified | Platform: | Unspecified |
Description
It would be great if r.statistics was enhanced with the following:
- allow output to file, not only output to stdout
- add option for distribution frequency count, not only distribution percentages
Change History (7)
follow-up: 2 comment:1 by , 12 years ago
CPU: | → Unspecified |
---|---|
Milestone: | 6.4.0 → 7.0.0 |
Platform: | → Unspecified |
Priority: | major → normal |
follow-up: 3 comment:2 by , 12 years ago
Replying to neteler:
The parameter
output Resultant raster map (not used with 'distribution')
has been added a while ago.
IIRC, instead of a raster file output, I meant a text file output of the statistics, giving you something like this:
BaseValue StatisticOfCoverValue
e.g. for each land class type of landuse96_28m give me the average elevation.
Something like the file options in v.db.select for example.
"distribution frequency count" is not yet available.
This shouldn't be too difficult to add. Don't have the time to do this now, but in raster/r.statistics/o_distrib.c it should suffice to direct the content of the fd2 tempfile to the output file.
Moritz
follow-up: 4 comment:3 by , 12 years ago
Replying to mlennert:
Replying to neteler:
"distribution frequency count" is not yet available.
This shouldn't be too difficult to add. Don't have the time to do this now, but in raster/r.statistics/o_distrib.c it should suffice to direct the content of the fd2 tempfile to the output file.
Just noticed that I was looking at grass6dev. In grass7 there is no o_distrib.c anymore, and no 'distribution' method. Why was this taken out ? Redundancy with r.stats ?
Moritz
follow-up: 5 comment:4 by , 12 years ago
Replying to mlennert:
Just noticed that I was looking at grass6dev. In grass7 there is no o_distrib.c anymore, and no 'distribution' method. Why was this taken out ? Redundancy with r.stats ?
It was removed in r40648. I suspect that the reason was that it doesn't behave like any of the other methods. Rather than generating an output map, it just prints statistics to stdout. If the functionality is desired, it should probably be in a separate r.distribution module.
follow-up: 6 comment:5 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Replying to glynn:
Replying to mlennert:
Just noticed that I was looking at grass6dev. In grass7 there is no o_distrib.c anymore, and no 'distribution' method. Why was this taken out ? Redundancy with r.stats ?
It was removed in r40648. I suspect that the reason was that it doesn't behave like any of the other methods. Rather than generating an output map, it just prints statistics to stdout. If the functionality is desired, it should probably be in a separate r.distribution module.
I understand the logic and am closing this ticket as wontfix. I guess what I was looking for would be more an enhancement of r.stats / r.reports to provide different types of statistics of a cover map for different categories of a base map (e.g. what is the range, stdev, min, max, whatever of elevation in class 1 of my landcover map ?).
Moritz
follow-up: 7 comment:6 by , 12 years ago
Replying to mlennert:
Replying to glynn:
Replying to mlennert:
Just noticed that I was looking at grass6dev. In grass7 there is no o_distrib.c anymore, and no 'distribution' method. Why was this taken out ? Redundancy with r.stats ?
It was removed in r40648. I suspect that the reason was that it doesn't behave like any of the other methods. Rather than generating an output map, it just prints statistics to stdout. If the functionality is desired, it should probably be in a separate r.distribution module.
I understand the logic and am closing this ticket as wontfix. I guess what I was looking for would be more an enhancement of r.stats / r.reports to provide different types of statistics of a cover map for different categories of a base map (e.g. what is the range, stdev, min, max, whatever of elevation in class 1 of my landcover map ?).
Some of that can be done with r.univar which also allows output to file. I am not sure if this is what you mean.
Markus M
comment:7 by , 12 years ago
Replying to mmetz:
Replying to mlennert:
I understand the logic and am closing this ticket as wontfix. I guess what I was looking for would be more an enhancement of r.stats / r.reports to provide different types of statistics of a cover map for different categories of a base map (e.g. what is the range, stdev, min, max, whatever of elevation in class 1 of my landcover map ?).
Some of that can be done with r.univar which also allows output to file. I am not sure if this is what you mean.
Wow, once again a functionality which has been in the code for almost 2 years without me noticing. GRASS never ceases to surprise... (In case others are looking for the functionality: it's the 'zones' parameter present since 6.4.2).
Thanks !
Moritz
The parameter
has been added a while ago.
"distribution frequency count" is not yet available.