Skip to content

Commit

Permalink
Fix some saga tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Feb 8, 2021
1 parent b106c20 commit e0c6b37
Showing 1 changed file with 78 additions and 14 deletions.
92 changes: 78 additions & 14 deletions python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml
Expand Up @@ -10,7 +10,9 @@ tests:
type: raster
results:
INVERSE:
hash: 8e3947b878a00f70ce837fba962f6be6d3f0c8eae2d614099b015f1e
hash:
- 8e3947b878a00f70ce837fba962f6be6d3f0c8eae2d614099b015f1e
- 5c37dab356adbd59ceb03d0e77802b43ce0ebaf930885375a5e14872
type: rasterhash

- algorithm: saga:fixeddistancebuffer
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -117,7 +128,9 @@ tests:
type: multi
results:
RESULT:
hash: 68d805a45416467e0f1be3066dd642772cf8ffdff9535f3254cd5ffb
hash:
- 68d805a45416467e0f1be3066dd642772cf8ffdff9535f3254cd5ffb
- dbc59273f8c53a3a3d9cd57d3d3aa782905205b5b95acdf4097ecdf9
type: rasterhash

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

- algorithm: saga:rastercalculator
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -346,7 +376,6 @@ tests:
name: expected/saga/polygon_intersect.shp
type: vector


- algorithm: saga:polygonselfintersection #spellok
name: Polygon self intersection
params:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -512,7 +550,9 @@ tests:
RESAMPLING: 0
results:
COMPLETED:
hash: e016ba480e7c9a7cfe7bbbec50f4f3df0e796be7641fe68744f541b5
hash:
- e016ba480e7c9a7cfe7bbbec50f4f3df0e796be7641fe68744f541b5
- 7e78dbfe516c25ba76f2443b2670dab8943376f76dacec9669254535
type: rasterhash


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

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

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

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

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

- algorithm: saga:multipleregressionanalysispointsandpredictorgrids
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -784,6 +844,8 @@ tests:
precision: 2
VAR_SIG:
precision: 6
REGCOEFF:
precision: 2
REGRESCORR:
hash: d70078f0151919949c1e55c1a677f1a7cda6f7514667270af6745c0d
type: rasterhash
Expand All @@ -799,3 +861,5 @@ tests:
precision: 2
RESIDUAL:
precision: 2
REGCOEFF:
precision: 2

0 comments on commit e0c6b37

Please sign in to comment.