changeset 8607:2010da0904b7

(issue1754) Fix radius caluculation inf CurveFilter if Start > End
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 24 Mar 2015 10:50:46 +0100
parents c985b27e3a8c
children 0f6f702742b4
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/DifferenceCurveFilterFacet.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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");

http://dive4elements.wald.intevation.org