From a2df705677f5f72753d5576f1d76ed99807a632e Mon Sep 17 00:00:00 2001 From: Hans van der Kwast Date: Sat, 9 Mar 2019 16:43:59 +0100 Subject: [PATCH] corrected for 0 vectors --- crayfish/processing/saga_flow_to_grib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crayfish/processing/saga_flow_to_grib.py b/crayfish/processing/saga_flow_to_grib.py index 23a8a0b5..0a39f9b7 100644 --- a/crayfish/processing/saga_flow_to_grib.py +++ b/crayfish/processing/saga_flow_to_grib.py @@ -106,13 +106,13 @@ def processAlgorithm(self, parameters, context, feedback): y_block = QgsRasterBlock(Qgis.Float32, width, height) diag = 1. / sqrt(2) dir_map = { - 0: (0, 1), + 0: (1e-7, 1), 1: (diag, diag), - 2: (1, 0), + 2: (1, 1e-7), 3: (diag, -diag), - 4: (0, -1), + 4: (1e-7, -1), 5: (-diag, -diag), - 6: (-1, 0), + 6: (-1, 1e-7), 7: (-diag, diag), 255: (0, 0) }