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.quantile doesn't work when called from qgis #29566

Closed
qgib opened this issue Apr 3, 2019 · 2 comments
Closed

r.quantile doesn't work when called from qgis #29566

qgib opened this issue Apr 3, 2019 · 2 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS

Comments

@qgib
Copy link
Contributor

qgib commented Apr 3, 2019

Author Name: Daniel Morton (Daniel Morton)
Original Redmine Issue: 21751
Affected QGIS version: 3.4.6
Redmine category:grass


The grass arguments constructed by qgis have an error, so quantiles are not calculated. This applies to all versions since and including 3.4.6 LTR

Processing algorithm…
Algorithm 'r.quantile' starting…
Input parameters:
{ '-r' : False, 'GRASS_REGION_CELLSIZE_PARAMETER' : 0, 'GRASS_REGION_PARAMETER' : None, 'bins' : 1000000, 'html' : 'C:/Users/danm/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/outputs/report.html', 'input' : 'E:/work/PASSES/output442eafcacec44453adacaabf1318a15a.1.tif', 'percentiles' : '', 'quantiles' : 50 }

g.proj -c proj4="+proj=longlat +datum=WGS84 +no_defs"
r.external input="E:\work\PASSES\output442eafcacec44453adacaabf1318a15a.1.tif" band=1 output="rast_5ca4cf97be96e2" --overwrite -o
g.region n=1.0332871555555554 s=-0.3229443447222222 e=102.42590869527778 w=101.07866034805555 res=0.00022457882100720682
r.quantile input=rast_5ca4cf97be96e2 quantiles=50 bins=1000000 html=- > "C:/Users/danm/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/outputs/report.html" --overwrite
Starting GRASS GIS...
WARNING: Concurrent mapset locking is not supported on Windows
Executing <C:\Users\danm\AppData\Local\Temp\processing_97caa1fd8ae04659b492832728037cb5\grassdata\grass_batch_job.cmd> ...
C:\Windows\System32>chcp 1252 1>NUL
C:\Windows\System32>g.proj -c proj4="+proj=longlat +datum=WGS84 +no_defs"
Default region was updated to the new projection, but if you have multiple mapsets g.region -d should be run in each to update the region from the default
Projection information updated
C:\Windows\System32>r.external input="E:\work\PASSES\output442eafcacec44453adacaabf1318a15a.1.tif" band=1 output="rast_5ca4cf97be96e2" --overwrite -o
Over-riding projection check
Reading band 1 of 1...
Link to raster map <rast_5ca4cf97be96e2> created.
C:\Windows\System32>g.region n=1.0332871555555554 s=-0.3229443447222222 e=102.42590869527778 w=101.07866034805555 res=0.00022457882100720682
C:\Windows\System32>r.quantile input=rast_5ca4cf97be96e2 quantiles=50 bins=1000000 html=- --overwrite 1>"C:/Users/danm/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/outputs/report.html"
Compute quantiles using two passes.
Usage:
r.quantile [-r] input=name [quantiles=value]
[percentiles=value[,value,...]] [bins=value] [file=name] [--overwrite]
[--help] [--verbose] [--quiet] [--ui]
Flags:
-r Generate recode rules based on quantile-defined intervals
Parameters:
input Name of input raster map
quantiles Number of quantiles
default: 4
percentiles List of percentiles
bins Number of bins to use
default: 1000000
file Name for output file (if omitted or "-" output to stdout)
ERROR: r.quantile: Sorry, is not a valid parameter
C:\Windows\System32>exit
Execution of <C:\Users\danm\AppData\Local\Temp\processing_97caa1fd8ae04659b492832728037cb5\grassdata\grass_batch_job.cmd> finished.
Cleaning up temporary files...
Press any key to continue . . .
Execution completed in 38.62 seconds
Results:
{'html': 'C:/Users/danm/AppData/Roaming/QGIS/QGIS3/profiles/default/processing/outputs/report.html'}

@qgib
Copy link
Contributor Author

qgib commented Apr 4, 2019

Author Name: Pedro Venâncio (Pedro Venâncio)


I confirm this issue.

The parameter html in

QgsProcessingParameterFileDestination|html|Quantiles|Html files (*.html)|report.html|False

should be file

QgsProcessingParameterFileDestination|file|Quantiles|Html files (*.html)|report.html|False

https://grass.osgeo.org/grass76/manuals/r.quantile.html

@qgib
Copy link
Contributor Author

qgib commented Apr 4, 2019

Author Name: Jürgen Fischer (@jef-n)


Applied in changeset f1dbcc3.


  • done_ratio was changed from 0 to 100
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Apr 4, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! GRASS labels 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