Skip to content
Permalink
Browse files

Fix some saga tests

  • Loading branch information
nyalldawson committed Feb 5, 2021
1 parent 06e187b commit 37cfcaf88179f642b70aabbd2d63270f05a6c246
Showing with 78 additions and 14 deletions.
  1. +78 −14 python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml
@@ -10,7 +10,9 @@ tests:
type: raster
results:
INVERSE:
hash: 8e3947b878a00f70ce837fba962f6be6d3f0c8eae2d614099b015f1e
hash:
- 8e3947b878a00f70ce837fba962f6be6d3f0c8eae2d614099b015f1e
- 5c37dab356adbd59ceb03d0e77802b43ce0ebaf930885375a5e14872
type: rasterhash

- algorithm: saga:fixeddistancebuffer
@@ -45,6 +47,11 @@ tests:
RESULT:
name: expected/saga/add_grid_to_points.shp
type: vector
compare:
fields:
demtif:
precision: 0


- algorithm: saga:addrastervaluestofeatures
name: Add raster values to shapes
@@ -62,6 +69,10 @@ tests:
RESULT:
name: expected/saga/add_grid_to_shapes.shp
type: vector
compare:
fields:
demtif:
precision: 0

- algorithm: saga:mergevectorlayers
name: Merge vector layers
@@ -117,7 +128,9 @@ tests:
type: multi
results:
RESULT:
hash: 68d805a45416467e0f1be3066dd642772cf8ffdff9535f3254cd5ffb
hash:
- 68d805a45416467e0f1be3066dd642772cf8ffdff9535f3254cd5ffb
- dbc59273f8c53a3a3d9cd57d3d3aa782905205b5b95acdf4097ecdf9
type: rasterhash

- algorithm: saga:rastercalculator
@@ -137,7 +150,9 @@ tests:
type: multi
results:
RESULT:
hash: c8c2c7c32ad3eaa1ebb491aed7af7d16f1c7f574a3de1f7622894092
hash:
- c8c2c7c32ad3eaa1ebb491aed7af7d16f1c7f574a3de1f7622894092
- 95619f06b421e0a61e083f5d3e32597958e0135a3a64ef2d6ac8ca6c
type: rasterhash

- algorithm: saga:rastercalculator
@@ -269,6 +284,9 @@ tests:
RESULT:
name: expected/saga/polygon_update.shp
type: vector
compare:
geometry:
topo_equal_check: True

- algorithm: saga:polygonunion
name: Polygon union
@@ -284,6 +302,9 @@ tests:
RESULT:
name: expected/saga/polygon_union.shp
type: vector
compare:
geometry:
topo_equal_check: True

- algorithm: saga:polygonidentity
name: Polygon identity
@@ -299,6 +320,9 @@ tests:
RESULT:
name: expected/saga/polygon_identity.shp
type: vector
compare:
geometry:
topo_equal_check: True

- algorithm: saga:difference
name: Polygon difference
@@ -314,6 +338,9 @@ tests:
RESULT:
name: expected/saga/polygon_difference.shp
type: vector
compare:
geometry:
topo_equal_check: True

# Note - SAGA results are wrong here, so really we are just testing that the algorithm runs. Use the native one instead!
- algorithm: saga:symmetricaldifference
@@ -330,6 +357,9 @@ tests:
RESULT:
name: expected/saga/polygon_symmetrical_difference.shp
type: vector
compare:
geometry:
topo_equal_check: True

- algorithm: saga:intersect
name: Polygon intersect
@@ -346,7 +376,6 @@ tests:
name: expected/saga/polygon_intersect.shp
type: vector


- algorithm: saga:polygonselfintersection #spellok
name: Polygon self intersection
params:
@@ -357,6 +386,9 @@ tests:
INTERSECT:
name: expected/saga/polygon_self_intersection.shp
type: vector
compare:
geometry:
topo_equal_check: True

- algorithm: saga:crossprofiles
name: Cross profiles
@@ -374,6 +406,10 @@ tests:
PROFILES:
name: expected/saga/cross_profiles.shp
type: vector
compare:
fields:
X000:
precision: 1

- algorithm: saga:snappointstolines
name: Snap points to lines
@@ -443,7 +479,9 @@ tests:
THRESHOLD: 0.5
results:
BORDERS:
hash: d0cd8bdc7c8400bedb2b5c1edc4a64b4c9b7c14692a4f30fbf3c5f2d
hash:
- d0cd8bdc7c8400bedb2b5c1edc4a64b4c9b7c14692a4f30fbf3c5f2d
- 11a19537feab53c2da39ad30829384d43988520221f9f528b8f51a98
type: rasterhash
SEEDS:
name: expected/saga/watershed_segmentation_seeds.shp
@@ -512,7 +550,9 @@ tests:
RESAMPLING: 0
results:
COMPLETED:
hash: e016ba480e7c9a7cfe7bbbec50f4f3df0e796be7641fe68744f541b5
hash:
- e016ba480e7c9a7cfe7bbbec50f4f3df0e796be7641fe68744f541b5
- 7e78dbfe516c25ba76f2443b2670dab8943376f76dacec9669254535
type: rasterhash


@@ -577,7 +617,9 @@ tests:
TARGET_USER_SIZE: 0.0005
results:
OUTPUT:
hash: 1b3a17a724c489ea2eea60b39bc1b9c79778832bd41e982a4e9fb09f
hash:
- 1b3a17a724c489ea2eea60b39bc1b9c79778832bd41e982a4e9fb09f
- 746dddd24daf093807e1a89dd2fa8b2ffe165a97f64388b26de99db4
type: rasterhash

- algorithm: saga:resampling
@@ -593,7 +635,9 @@ tests:
TARGET_USER_SIZE: 5.0e-05
results:
OUTPUT:
hash: 32008adf7520fee2848d689fcb53d0f8ac862bcd162575b03fefc7f1
hash:
- 32008adf7520fee2848d689fcb53d0f8ac862bcd162575b03fefc7f1
- c3e15725bcee7b4df8a3da0b275291f73eff246873f5e8b2ef407d89
type: rasterhash

- algorithm: saga:resamplingfilter
@@ -605,7 +649,9 @@ tests:
SCALE: 10.0
results:
HIPASS:
hash: cf992e69d506924bb59a5fbabd86617e263cb951a61c1b3c0b10012b
hash:
- cf992e69d506924bb59a5fbabd86617e263cb951a61c1b3c0b10012b
- e63437e6b71cd48110787268adf53ba5312248e8096590afc2f813d6
type: rasterhash
LOPASS:
hash: f36069a8ceb7ffe839a34f66b82eebacb80143e9df4ed54485bf8293
@@ -620,7 +666,9 @@ tests:
MINSLOPE: 0.01
results:
RESULT:
hash: aa197cdf1b0bac1595bd337bab08ae3cddb82ddb4d06c17b528a1d43
hash:
- aa197cdf1b0bac1595bd337bab08ae3cddb82ddb4d06c17b528a1d43
- b91a5d26e540f6804210a1e3800c49ff123936784c658174bbce5642
type: rasterhash

- algorithm: saga:fillsinksqmofesp
@@ -632,7 +680,9 @@ tests:
DZFILL: 0.01
results:
FILLED:
hash: ebd24bb7d011f0c4d87d1e4748e89d90d5a78cfa820070ece87df4d0
hash:
- ebd24bb7d011f0c4d87d1e4748e89d90d5a78cfa820070ece87df4d0
- d17ab06bebda593113a0afa9abed6333cbd5d81779c2f777824854ea
type: rasterhash
SINKS:
hash: 83d1936c0421783372573c9dcd04e6415e9db911c5fa254e74c929b0
@@ -647,7 +697,9 @@ tests:
MINSLOPE: 0.01
results:
FDIR:
hash: 24367e9ca83c757628f329029d82341fe9111138e019138c949c34c0
hash:
- 24367e9ca83c757628f329029d82341fe9111138e019138c949c34c0
- ea186bdf305cb484ee07923fe34a70554d422f8e414554120627a96f
type: rasterhash
FILLED:
hash: aa197cdf1b0bac1595bd337bab08ae3cddb82ddb4d06c17b528a1d43
@@ -665,7 +717,9 @@ tests:
MINSLOPE: 0.1
results:
FILLED:
hash: aa197cdf1b0bac1595bd337bab08ae3cddb82ddb4d06c17b528a1d43
hash:
- aa197cdf1b0bac1595bd337bab08ae3cddb82ddb4d06c17b528a1d43
- b91a5d26e540f6804210a1e3800c49ff123936784c658174bbce5642
type: rasterhash

- algorithm: saga:svmclassification
@@ -704,7 +758,9 @@ tests:
SVM_TYPE: 0
results:
CLASSES:
hash: deeb8769979916ab544a824cd5400d4a4207e7df37fbeaaa6e4830af
hash:
- deeb8769979916ab544a824cd5400d4a4207e7df37fbeaaa6e4830af
- 1c4b3628bb3c0f3484c85ee80f06bd7cf9ef8d59be46446b87383ed3
type: rasterhash

- algorithm: saga:multipleregressionanalysispointsandpredictorgrids
@@ -748,13 +804,17 @@ tests:
precision: 6
P:
precision: 6
REGCOEFF:
precision: 2
INFO_MODEL:
name: expected/saga/multiple_regression_points_grids_model.dbf
type: vector
compare:
fields:
VALUE:
precision: 2
REGCOEFF:
precision: 2
INFO_STEPS:
name: expected/saga/multiple_regression_points_grids_steps.dbf
type: vector
@@ -784,6 +844,8 @@ tests:
precision: 2
VAR_SIG:
precision: 6
REGCOEFF:
precision: 2
REGRESCORR:
hash: d70078f0151919949c1e55c1a677f1a7cda6f7514667270af6745c0d
type: rasterhash
@@ -799,3 +861,5 @@ tests:
precision: 2
RESIDUAL:
precision: 2
REGCOEFF:
precision: 2

0 comments on commit 37cfcaf

Please sign in to comment.