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

correctly redirect algorithm output from stdout to Processing output #36644

Merged
merged 2 commits into from
May 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ QgsProcessingParameterRasterLayer|map|Name of raster map|None|False
QgsProcessingParameterString|cats|Category values (for Integer rasters). Example: 1,3,7-9,13|None|False|True
QgsProcessingParameterString|values|Comma separated value list (for float rasters). Example: 1.4,3.8,13|None|False|True
QgsProcessingParameterString|separator|Field separator (Special characters: pipe, comma, space, tab, newline)|tab|False|True
QgsProcessingParameterFileDestination|output|Category|Txt files (*.txt)|None|False
QgsProcessingParameterFileDestination|html|Category|HTML files (*.html)|None|False
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Locates the closest points between objects in two raster maps.
Raster (r.*)
QgsProcessingParameterMultipleLayers|map|Name of two input raster for computing inter-class distances|3|None|False
QgsProcessingParameterString|separator|Field separator (Special characters: pipe, comma, space, tab, newline)|:|False|True
QgsProcessingParameterEnum|sort|Sort output by distance|asc;desc
QgsProcessingParameterEnum|sort|Sort output by distance|asc;desc|0
*QgsProcessingParameterBoolean|-l|Include category labels in the output|False|True
*QgsProcessingParameterBoolean|-o|Report zero distance if rasters are overlapping|False|True
*QgsProcessingParameterBoolean|-n|Report null objects as *|False|True
QgsProcessingParameterFileDestination|output|Distance|Txt files (*.txt)|None|False
QgsProcessingParameterFileDestination|html|Distance|HTML files (*.html)|None|False
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ QgsProcessingParameterRasterLayer|map|Raster map to be queried|None|False
QgsProcessingParameterString|line|Transect definition: east,north,azimuth,distance[,east,north,azimuth,distance,...]|None|False|False
QgsProcessingParameterString|null_value|String representing NULL value|*|False|True
*QgsProcessingParameterBoolean|-g|Output easting and northing in first two columns of four column output|False
QgsProcessingParameterFileDestination|output|Transect file|Txt files (*.txt)|None|False
QgsProcessingParameterFileDestination|html|Transect file|HTML files (*.html)|None|False
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
r.what.color
Queries colors for a raster map layer.
Queries colors for a raster map layer.
Raster (r.*)
QgsProcessingParameterRasterLayer|input|Raster map to query colors|None|False
QgsProcessingParameterString|value|Values to query colors for (comma separated list)|None|False|True
QgsProcessingParameterString|format|Output format (printf-style)|%d:%d:%d|False|True
QgsProcessingParameterFileDestination|output|Colors file|Txt files (*.txt)|None|False
QgsProcessingParameterFileDestination|html|Colors file|HTML files (*.html)|None|False

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><p>1|
</br>3|
</br></p></body></html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><p>1|1|0|344550|6693650|344550|6693650
</br>1|2|100|357850|6693650|357850|6693550
</br>1|3|100|352650|6693650|352750|6693650
</br>1|4|100|344550|6693650|344650|6693650
</br></p></body></html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body><p> 0.000000 *
</br> 11.131738 *
</br> 22.263476 *
</br> 33.395214 *
</br> 44.526952 *
</br> 55.658690 *
</br> 66.790428 *
</br> 77.922166 *
</br> 89.053904 *
</br> 100.185642 *
</br> 111.317380 *
</br> 122.449118 *
</br> 133.580856 *
</br> 144.712594 *
</br> 155.844332 *
</br> 166.976070 *
</br> 178.107808 *
</br> 189.239546 *
</br> 200.371284 *
</br> 211.503022 *
</br> 222.634760 *
</br> 233.766498 *
</br> 244.898236 *
</br> 256.029974 *
</br> 267.161712 *
</br> 278.293450 *
</br> 289.425188 *
</br> 300.556926 *
</br> 311.688664 *
</br> 322.820402 *
</br> 333.952140 *
</br> 345.083878 *
</br> 356.215616 *
</br> 367.347354 *
</br> 378.479092 *
</br> 389.610830 *
</br> 400.742568 *
</br> 411.874306 *
</br> 423.006044 *
</br> 434.137782 *
</br> 445.269520 *
</br> 456.401258 *
</br> 467.532996 *
</br> 478.664735 *
</br> 489.796473 *
</br> 500.928211 205.138351
</br> 512.059949 205.318710
</br> 523.191687 205.495285
</br> 534.323425 205.495285
</br> 545.455163 205.821854
</br> 556.586901 205.821854
</br> 567.718639 205.783768
</br> 578.850377 205.979141
</br> 589.982115 206.251450
</br> 601.113853 206.251450
</br> 612.245591 205.880493
</br> 623.377329 205.836166
</br> 634.509067 205.732651
</br> 645.640805 205.595428
</br> 656.772543 205.430023
</br> 667.904281 205.378067
</br> 679.036019 205.319443
</br> 690.167757 205.254715
</br> 701.299495 205.249222
</br> 712.431233 205.236145
</br> 723.562971 205.259949
</br> 734.694709 205.270432
</br> 745.826447 205.262131
</br> 756.958185 205.377014
</br> 768.089923 205.607269
</br> 779.221661 205.595917
</br> 790.353399 205.595917
</br> 801.485137 205.434143
</br> 812.616875 205.460281
</br> 823.748613 204.887589
</br> 834.880351 204.887589
</br> 846.012089 204.897888
</br> 857.143827 204.760162
</br> 868.275565 204.667984
</br> 879.407303 204.429520
</br> 890.539041 204.267075
</br> 901.670779 204.102463
</br> 912.802517 204.111267
</br> 923.934255 204.006958
</br> 935.065993 203.916763
</br> 946.197731 203.916763
</br> 957.329469 203.844650
</br> 968.461207 203.807053
</br> 979.592945 203.620804
</br> 990.724683 203.620804
</br> 1001.856421 203.590958
</br> 1012.988159 203.568954
</br> 1024.119897 202.713715
</br> 1035.251635 202.250137
</br> 1046.383373 202.496780
</br> 1057.515111 202.496780
</br> 1068.646849 202.220749
</br> 1079.778587 201.905304
</br> 1090.910325 202.617706
</br> 1102.042063 202.617706
</br> 1113.173801 202.548965
</br> 1124.305539 202.548965
</br> 1135.437277 201.737747
</br> 1146.569015 203.751297
</br> 1157.700753 204.331894
</br> 1168.832491 205.502548
</br> 1179.964229 205.094772
</br> 1191.095967 206.328064
</br> 1202.227705 207.685989
</br> 1213.359443 207.685989
</br> 1224.491181 207.228424
</br> 1235.622919 208.234695
</br> 1246.754657 207.387192
</br> 1257.886395 208.456528
</br> 1269.018133 207.702118
</br> 1280.149871 209.769608
</br> 1291.281609 209.256638
</br> 1302.413347 210.122696
</br> 1313.545085 210.852707
</br> 1324.676823 210.477142
</br> 1335.808561 210.969177
</br> 1346.940299 211.702469
</br> 1358.072037 212.129456
</br> 1369.203775 212.273148
</br> 1380.335513 211.513382
</br> 1391.467251 211.751450
</br> 1402.598989 211.751450
</br> 1413.730728 211.751450
</br> 1424.862466 212.713165
</br> 1435.994204 212.717163
</br> 1447.125942 212.597549
</br> 1458.257680 212.465286
</br> 1469.389418 211.670486
</br> 1480.521156 211.176804
</br> 1491.652894 210.477997
</br></p></body></html>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
100: 70:10:93
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,22 @@ tests:
type: file
name: expected/grass7/r.what.points.txt

- algorithm: grass7:r.what.color
name: GRASS 7 r.what.color
params:
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
format: '%d:%d:%d'
input:
name: custom/grass7/float_raster.tif
type: raster
value: '100'
results:
html:
name: expected/grass7/r_what_color.html
type: regex
rules:
- '100: 70:10:93'

- algorithm: grass7:r.what.coords
name: GRASS7 r.what.coords
params:
Expand Down Expand Up @@ -1518,3 +1534,64 @@ tests:
output:
hash: b07a8fd2a3ff63851d0eb123cafd8024986d22ea453f89c808765c83
type: rasterhash

- algorithm: grass7:r.transect
name: GRASS 7 r.transect
params:
-g: false
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
line: 2077686.512558,5744286.456837,45,1500
map:
name: custom/dem_crs.tif
type: raster
null_value: '*'
results:
html:
name: expected/grass7/r_transect.html
type: regex
rules:
- '556.586901 205.821854'
- '1191.095967 206.328064'
- '1435.994204 212.717163'

- algorithm: grass7:r.category.out
name: GRASS 7 r.category.out
params:
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
cats: 1,3
map:
name: custom/grass7/raster_6class.tif
type: raster
separator: pipe
values: ''
results:
html:
name: expected/grass7/r_category_out.html
type: regex
rules:
- '1|'
- '3|'

- algorithm: grass7:r.distance
name: GRASS 7 r.distance
params:
-l: false
-n: false
-o: false
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
map:
params:
- name: custom/grass7/raster_1class.tif
type: raster
- name: custom/grass7/raster_4class.tif
type: raster
type: multi
separator: pipe
sort: 0
results:
html:
name: expected/grass7/r_distance.html
type: regex
rules:
- '1|1|0|344550|6693650|344550|6693650'
- '1|3|100|352650|6693650|352750|6693650'