Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r.statistics needs to be implemented as a special case in Processing (or removed) #20174

Closed
qgib opened this issue Jan 8, 2015 · 6 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS

Comments

@qgib
Copy link
Contributor

qgib commented Jan 8, 2015

Author Name: Markus Mayr (@scubbx)
Original Redmine Issue: 11967
Affected QGIS version: 2.6.1
Redmine category:processing/grass
Assignee: Victor Olaya


When using the "r.statistics" GRASS algorithm via the processing toolbox, the output always corresponds to the layer selected as "Base raster layer". There is no calculation performed.
A more specialized algorithm like "r.average" seems to perform the calculation.

@qgib
Copy link
Contributor Author

qgib commented Jan 8, 2015

Author Name: Giovanni Manghi (@gioman)


as it is implemented now in Processing, r.statistics cannot work.

The reason is that the result of r.statistic (in native GRASS) is a raster layer that has the same pixel values of the base layer, where the computed statistics are stored into the (GRASS) raster labels.

The computed values can be "extracted" by doing a simple r.mapcalc operation.

So the options are:

  1. remove r.statistics from Processing

  2. modify GrassAlgorithm.py and add a special case (it has already be done for r.horizon and r.composite) to cope with this special module


  • operating_system was changed from Linux Mint to
  • os_version was changed from 17.1 to

@qgib
Copy link
Contributor Author

qgib commented Jan 8, 2015

Author Name: Giovanni Manghi (@gioman)


  1. modify GrassAlgorithm.py and add a special case (it has already be done for r.horizon and r.composite) to cope with this special module

note:
the map outputted by r.statistics must be processed this way

r.mapcalc "newoutput=@statistics_output"

before outputting (newoutput) with r.out.gdal

@qgib
Copy link
Contributor Author

qgib commented Jan 18, 2015

Author Name: Giovanni Manghi (@gioman)


  • subject was changed from r.statistics broken? to r.statistics needs to be implemented as a special case in Processing (or removed)

@qgib
Copy link
Contributor Author

qgib commented May 19, 2015

Author Name: Markus Mayr (@scubbx)


I added the proposed step to the processing code: #2043
For me, this produces valid results now.

@qgib
Copy link
Contributor Author

qgib commented May 25, 2015

Author Name: Giovanni Manghi (@gioman)


  • pull_request_patch_supplied was changed from 0 to 1

@qgib
Copy link
Contributor Author

qgib commented Jun 1, 2015

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to fixed/implemented
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS labels May 25, 2019
@qgib qgib closed this as completed May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS
Projects
None yet
Development

No branches or pull requests

1 participant