diff --git a/python/plugins/processing/algs/saga/description/MultipleRegressionAnalysis(PointsandPredictorGrids).txt b/python/plugins/processing/algs/saga/description/MultipleRegressionAnalysis(PointsandPredictorGrids).txt index fb11385e70d1..6bb23496e2f7 100644 --- a/python/plugins/processing/algs/saga/description/MultipleRegressionAnalysis(PointsandPredictorGrids).txt +++ b/python/plugins/processing/algs/saga/description/MultipleRegressionAnalysis(PointsandPredictorGrids).txt @@ -2,13 +2,13 @@ Multiple Regression Analysis (Points and Predictor Grids) statistics_regression QgsProcessingParameterMultipleLayers|PREDICTORS|Predictors|3|None|False QgsProcessingParameterFeatureSource|POINTS|Points|-1|None|False -QgsProcessingParameterFeatureSource|ATTRIBUTE|Dependent Variable|5|None|False -QgsProcessingParameterFeatureSource|INFO_COEFF|Details: Coefficients|5|None|True -QgsProcessingParameterFeatureSource|INFO_MODEL|Details: Model|5|None|True -QgsProcessingParameterFeatureSource|INFO_STEPS|Details: Steps|5|None|True -QgsProcessingParameterVectorDestination|RESIDUALS|Residuals +QgsProcessingParameterField|ATTRIBUTE|Dependent Variable|None|POINTS|-1|False|False +QgsProcessingParameterVectorDestination|INFO_COEFF|Details: Coefficients|5|None|True|True +QgsProcessingParameterVectorDestination|INFO_MODEL|Details: Model|5|None|True|True +QgsProcessingParameterVectorDestination|INFO_STEPS|Details: Steps|5|None|True|True +QgsProcessingParameterVectorDestination|RESIDUALS|Residuals|-1|None|True|True QgsProcessingParameterRasterDestination|REGRESSION|Regression -QgsProcessingParameterRasterDestination|REGRESCORR|Regression with Residual Correction +QgsProcessingParameterRasterDestination|REGRESCORR|Regression with Residual Correction|None|True|True QgsProcessingParameterEnum|RESAMPLING|Resampling|[0] Nearest Neighbour;[1] Bilinear Interpolation;[2] Bicubic Spline Interpolation;[3] B-Spline Interpolation|False|3 QgsProcessingParameterBoolean|COORD_X|Include X Coordinate|False QgsProcessingParameterBoolean|COORD_Y|Include Y Coordinate|False @@ -17,4 +17,4 @@ QgsProcessingParameterEnum|METHOD|Method|[0] include all;[1] forward;[2] backwar QgsProcessingParameterNumber|P_VALUE|Significance Level|QgsProcessingParameterNumber.Double|5.000000|False|0.000000|100.000000 QgsProcessingParameterEnum|CROSSVAL|Cross Validation|[0] none;[1] leave one out;[2] 2-fold;[3] k-fold|False|0 QgsProcessingParameterNumber|CROSSVAL_K|Cross Validation Subsamples|QgsProcessingParameterNumber.Integer|10|False|2|None -QgsProcessingParameterEnum|RESIDUAL_COR|Residual Interpolation|[0] Multleve B-Spline Interpolation;[1] Inverse Distance Weighted|False|0 \ No newline at end of file +QgsProcessingParameterEnum|RESIDUAL_COR|Residual Interpolation|[0] Multleve B-Spline Interpolation;[1] Inverse Distance Weighted|False|0 diff --git a/python/plugins/processing/tests/testdata/custom/saga/points_regression.cpg b/python/plugins/processing/tests/testdata/custom/saga/points_regression.cpg new file mode 100644 index 000000000000..3ad133c048f2 --- /dev/null +++ b/python/plugins/processing/tests/testdata/custom/saga/points_regression.cpg @@ -0,0 +1 @@ +UTF-8 \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/custom/saga/points_regression.dbf b/python/plugins/processing/tests/testdata/custom/saga/points_regression.dbf new file mode 100644 index 000000000000..59e8a649b5cc Binary files /dev/null and b/python/plugins/processing/tests/testdata/custom/saga/points_regression.dbf differ diff --git a/python/plugins/processing/tests/testdata/custom/saga/points_regression.prj b/python/plugins/processing/tests/testdata/custom/saga/points_regression.prj new file mode 100644 index 000000000000..a30c00a55de1 --- /dev/null +++ b/python/plugins/processing/tests/testdata/custom/saga/points_regression.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/custom/saga/points_regression.qpj b/python/plugins/processing/tests/testdata/custom/saga/points_regression.qpj new file mode 100644 index 000000000000..5fbc831e7433 --- /dev/null +++ b/python/plugins/processing/tests/testdata/custom/saga/points_regression.qpj @@ -0,0 +1 @@ +GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] diff --git a/python/plugins/processing/tests/testdata/custom/saga/points_regression.shp b/python/plugins/processing/tests/testdata/custom/saga/points_regression.shp new file mode 100644 index 000000000000..3d763b9dee12 Binary files /dev/null and b/python/plugins/processing/tests/testdata/custom/saga/points_regression.shp differ diff --git a/python/plugins/processing/tests/testdata/custom/saga/points_regression.shx b/python/plugins/processing/tests/testdata/custom/saga/points_regression.shx new file mode 100644 index 000000000000..94bed55f050f Binary files /dev/null and b/python/plugins/processing/tests/testdata/custom/saga/points_regression.shx differ diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.dbf b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.dbf new file mode 100644 index 000000000000..ea06635fbfb5 Binary files /dev/null and b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.dbf differ diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.mtab b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.mtab new file mode 100644 index 000000000000..fc91d09716a3 --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.mtab @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + /tmp/processing_158a4797a951407ca275f957a94862a4/e678b6f2c3484cf9b60adafa5e69b1d6/dem.sgrd + + + + /tmp/processing_158a4797a951407ca275f957a94862a4/f2045b740e8e466293cb61f78c148a83/POINTS.shp + + MLRA Coefficients + + + + /home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.dbf + + + VAR_ID + VAR_NAME + REGCOEFF + R + R2 + R2_ADJ + STD_ERROR + T + SIG + P + + + + + + diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.prj b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.prj new file mode 100644 index 000000000000..6477a3f138a1 --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_coef.prj @@ -0,0 +1 @@ +GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.dbf b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.dbf new file mode 100644 index 000000000000..89edbd29fe88 Binary files /dev/null and b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.dbf differ diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.mtab b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.mtab new file mode 100644 index 000000000000..e2b48a6fd2bf --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.mtab @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + /tmp/processing_158a4797a951407ca275f957a94862a4/e678b6f2c3484cf9b60adafa5e69b1d6/dem.sgrd + + + + /tmp/processing_158a4797a951407ca275f957a94862a4/f2045b740e8e466293cb61f78c148a83/POINTS.shp + + MLRA Model + + + + /home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.dbf + + + PARAMETER + VALUE + + + + + + diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.prj b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.prj new file mode 100644 index 000000000000..6477a3f138a1 --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_model.prj @@ -0,0 +1 @@ +GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.dbf b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.dbf new file mode 100644 index 000000000000..fecb81f51b64 Binary files /dev/null and b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.dbf differ diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.mshp b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.mshp new file mode 100644 index 000000000000..d7c5929156fb --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.mshp @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + /tmp/processing_158a4797a951407ca275f957a94862a4/e678b6f2c3484cf9b60adafa5e69b1d6/dem.sgrd + + + + /tmp/processing_158a4797a951407ca275f957a94862a4/f2045b740e8e466293cb61f78c148a83/POINTS.shp + + POINTS.rvalue_1 [Residuals] + + + + + + + rvalue_1 + TREND + RESIDUAL + + + + + + diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.prj b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.prj new file mode 100644 index 000000000000..6477a3f138a1 --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.prj @@ -0,0 +1 @@ +GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.shp b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.shp new file mode 100644 index 000000000000..3d763b9dee12 Binary files /dev/null and b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.shp differ diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.shx b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.shx new file mode 100644 index 000000000000..94bed55f050f Binary files /dev/null and b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_res.shx differ diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.dbf b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.dbf new file mode 100644 index 000000000000..8718e5a13288 Binary files /dev/null and b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.dbf differ diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.mtab b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.mtab new file mode 100644 index 000000000000..3d760c42b5cf --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.mtab @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + /tmp/processing_158a4797a951407ca275f957a94862a4/e678b6f2c3484cf9b60adafa5e69b1d6/dem.sgrd + + + + /tmp/processing_158a4797a951407ca275f957a94862a4/f2045b740e8e466293cb61f78c148a83/POINTS.shp + + MLRA Steps + + + + /home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.dbf + + + MODEL + R + R2 + R2_ADJ + STD_ERROR + SSR + SSE + MSR + MSE + DF + F + SIG + VAR_F + VAR_SIG + DIR + VARIABLE + + + + + + diff --git a/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.prj b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.prj new file mode 100644 index 000000000000..6477a3f138a1 --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/saga/multiple_regression_points_grids_steps.prj @@ -0,0 +1 @@ +GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]] \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml b/python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml index 9e24b727c6ea..54bce1fa88fb 100644 --- a/python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml +++ b/python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml @@ -706,3 +706,96 @@ tests: CLASSES: hash: deeb8769979916ab544a824cd5400d4a4207e7df37fbeaaa6e4830af type: rasterhash + + - algorithm: saga:multipleregressionanalysispointsandpredictorgrids + name: Multi regression points predictor grids + params: + ATTRIBUTE: rvalue_1 + COORD_X: false + COORD_Y: false + CROSSVAL: 0 + CROSSVAL_K: 10 + INTERCEPT: true + METHOD: 3 + POINTS: + name: custom/saga/points_regression.shp + type: vector + PREDICTORS: + params: + - name: dem.tif + type: raster + type: multi + P_VALUE: 5.0 + RESAMPLING: 3 + RESIDUAL_COR: 0 + results: + INFO_COEFF: + name: expected/saga/multiple_regression_points_grids_coef.dbf + type: vector + compare: + fields: + R: + precision: 2 + R2: + precision: 2 + R2_ADJ: + precision: 2 + STD_ERROR: + precision: 2 + T: + precision: 2 + SIG: + precision: 6 + P: + precision: 6 + INFO_MODEL: + name: expected/saga/multiple_regression_points_grids_model.dbf + type: vector + compare: + fields: + VALUE: + precision: 2 + INFO_STEPS: + name: expected/saga/multiple_regression_points_grids_steps.dbf + type: vector + compare: + fields: + R: + precision: 2 + R2: + precision: 2 + R2_ADJ: + precision: 2 + STD_ERROR: + precision: 2 + SSR: + precision: 2 + SSE: + precision: 2 + MSR: + precision: 2 + MSE: + precision: 2 + F: + precision: 2 + SIG: + precision: 6 + VAR_F: + precision: 2 + VAR_SIG: + precision: 6 + REGRESCORR: + hash: d70078f0151919949c1e55c1a677f1a7cda6f7514667270af6745c0d + type: rasterhash + REGRESSION: + hash: b3a725ae64eec2aab8de1197f2306a0905c7c38de0dc89d58aadb3cc + type: rasterhash + RESIDUALS: + name: expected/saga/multiple_regression_points_grids_res.shp + type: vector + compare: + fields: + TREND: + precision: 2 + RESIDUAL: + precision: 2