Skip to content

Commit e893aae

Browse files
committed
[processing][grass] Fix definition of r.watershed, resurrect test
1 parent 0c24fdb commit e893aae

File tree

2 files changed

+53
-52
lines changed

2 files changed

+53
-52
lines changed

python/plugins/processing/algs/grass7/description/r.watershed.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ QgsProcessingParameterBoolean|-m|Enable disk swap memory option (-m): Operation
1515
QgsProcessingParameterBoolean|-4|Allow only horizontal and vertical flow of water|False
1616
QgsProcessingParameterBoolean|-a|Use positive flow accumulation even for likely underestimates|False
1717
QgsProcessingParameterBoolean|-b|Beautify flat areas|False
18-
QgsProcessingParameterRasterDestination|accumulation|Number of cells that drain through each cell
19-
QgsProcessingParameterRasterDestination|drainage|Drainage direction
20-
QgsProcessingParameterRasterDestination|basin|Unique label for each watershed basin
21-
QgsProcessingParameterRasterDestination|stream|Stream segments
22-
QgsProcessingParameterRasterDestination|half_basin|Half-basins
23-
QgsProcessingParameterRasterDestination|length_slope|Slope length and steepness (LS) factor for USLE
24-
QgsProcessingParameterRasterDestination|slope_steepness|Slope steepness (S) factor for USLE
25-
QgsProcessingParameterRasterDestination|tci|Topographic index ln(a / tan(b))
26-
QgsProcessingParameterRasterDestination|spi|Stream power index a * tan(b)
18+
QgsProcessingParameterRasterDestination|accumulation|Number of cells that drain through each cell|None|True
19+
QgsProcessingParameterRasterDestination|drainage|Drainage direction|None|True
20+
QgsProcessingParameterRasterDestination|basin|Unique label for each watershed basin|None|True
21+
QgsProcessingParameterRasterDestination|stream|Stream segments|None|True
22+
QgsProcessingParameterRasterDestination|half_basin|Half-basins|None|True
23+
QgsProcessingParameterRasterDestination|length_slope|Slope length and steepness (LS) factor for USLE|None|True
24+
QgsProcessingParameterRasterDestination|slope_steepness|Slope steepness (S) factor for USLE|None|True
25+
QgsProcessingParameterRasterDestination|tci|Topographic index ln(a / tan(b))|None|True
26+
QgsProcessingParameterRasterDestination|spi|Stream power index a * tan(b)|None|True

python/plugins/processing/tests/testdata/grass7_algorithms_raster_tests.yaml

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,49 +1691,50 @@ tests:
16911691
name: expected/grass7/r.li.simpson.ascii.txt
16921692
type: file
16931693

1694-
# Differences between osgeo4travis and Debian Stretch
1695-
# - algorithm: grass7:r.watershed
1696-
# name: GRASS7 r.watershed
1697-
# params:
1698-
# '-4': false
1699-
# -a: false
1700-
# -b: false
1701-
# -m: false
1702-
# -s: false
1703-
# GRASS_REGION_CELLSIZE_PARAMETER: 0.0
1704-
# GRASS_REGION_PARAMETER: 344500.0,358400.0,6682800.0,6693700.0
1705-
# convergence: 5
1706-
# elevation:
1707-
# name: custom/grass7/float_raster.tif
1708-
# type: raster
1709-
# max_slope_length: 50
1710-
# memory: 300
1711-
# threshold: 1
1712-
# results:
1713-
# accumulation:
1714-
# hash: 1ecbadff7aee4101be1c3626a7c77ebca3ae598d33672807f4a6fc34
1715-
# type: rasterhash
1716-
# basin:
1717-
# hash: d4691e1bff8bf352508ecbdf7c694208d07ef83bb13b0768418f322c
1718-
# type: rasterhash
1719-
# drainage:
1720-
# hash: 3e97f781cbca662823a53e7a6cb10e1edde2f8d0e4d64c28a62db2c0
1721-
# type: rasterhash
1722-
# half_basin:
1723-
# hash: 431a0c8359b7662169ef8a9adf469da47a282a70981de5bee24e3528
1724-
# type: rasterhash
1725-
# length_slope:
1726-
# hash: 69b5b31ac93a25f01b85e4f7867e5b8720183732d29d50c24204a7b9
1727-
# type: rasterhash
1728-
# slope_steepness:
1729-
# hash: cafb759a5701e78928a43d87e58e552f9186358b1de40c375047f81e
1730-
# type: rasterhash
1731-
# stream:
1732-
# hash: c6e7b081057d120e47e6d10f5abd05e47b42284c7d7974e64c71e053
1733-
# type: rasterhash
1734-
# tci:
1735-
# hash: 6b213bddf1223f392c01ab26e84485c01d652dfcae40aecd186f3295
1736-
# type: rasterhash
1694+
- algorithm: grass7:r.watershed
1695+
name: GRASS7 r.watershed
1696+
params:
1697+
'-4': false
1698+
-a: false
1699+
-b: false
1700+
-m: false
1701+
-s: false
1702+
GRASS_REGION_CELLSIZE_PARAMETER: 0.0
1703+
GRASS_REGION_PARAMETER: 344500.0,358400.0,6682800.0,6693700.0
1704+
convergence: 5
1705+
elevation:
1706+
name: custom/grass7/float_raster.tif
1707+
type: raster
1708+
max_slope_length: 50
1709+
memory: 300
1710+
threshold: 1
1711+
results:
1712+
accumulation:
1713+
hash: 1ecbadff7aee4101be1c3626a7c77ebca3ae598d33672807f4a6fc34
1714+
type: rasterhash
1715+
basin:
1716+
hash: d4691e1bff8bf352508ecbdf7c694208d07ef83bb13b0768418f322c
1717+
type: rasterhash
1718+
drainage:
1719+
hash: 3e97f781cbca662823a53e7a6cb10e1edde2f8d0e4d64c28a62db2c0
1720+
type: rasterhash
1721+
half_basin:
1722+
hash: 431a0c8359b7662169ef8a9adf469da47a282a70981de5bee24e3528
1723+
type: rasterhash
1724+
length_slope:
1725+
hash: 69b5b31ac93a25f01b85e4f7867e5b8720183732d29d50c24204a7b9
1726+
type: rasterhash
1727+
slope_steepness:
1728+
hash: cafb759a5701e78928a43d87e58e552f9186358b1de40c375047f81e
1729+
type: rasterhash
1730+
stream:
1731+
hash: c6e7b081057d120e47e6d10f5abd05e47b42284c7d7974e64c71e053
1732+
type: rasterhash
1733+
tci:
1734+
hash:
1735+
- 6b213bddf1223f392c01ab26e84485c01d652dfcae40aecd186f3295
1736+
- e58737ab4169e79243dd7e50dc87555a2180a7e5f6ba00fe18b10fff
1737+
type: rasterhash
17371738

17381739
# Differences between osgeo4travis and Debian Stretch
17391740
#- algorithm: grass7:r.transect

0 commit comments

Comments
 (0)