[PATCH 2 of 5] (issue1754) Fix radius caluculation inf CurveFilter if Start > End

Wald Commits scm-commit at wald.intevation.org
Tue Mar 24 11:09:21 CET 2015


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1427190646 -3600
# Node ID 2010da0904b700964b7b6ffd5eb7565b4255e47e
# Parent  c985b27e3a8cec9d7063dfb63b6bc684797787d8
(issue1754) Fix radius caluculation inf CurveFilter if Start > End

diff -r c985b27e3a8c -r 2010da0904b7 artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFilterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFilterFacet.java	Fri Mar 20 18:58:38 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFilterFacet.java	Tue Mar 24 10:50:46 2015 +0100
@@ -39,6 +39,11 @@
         Double start = (Double)context.getContextValue("startkm");
         Double end = (Double)context.getContextValue("endkm");
         if(start != null && end != null) {
+            if (start > end) {
+                Double buf = start;
+                start = end;
+                end = buf;
+            }
             RiverContext fc = (RiverContext)context.globalContext();
             // Adaptive smoothing, based on zoom factor/diagram extents.
             ZoomScale scales = (ZoomScale)fc.get("zoomscale");


More information about the Dive4Elements-commits mailing list