[PATCH] (issue1754) Do not base smoothing radius on calculation range

Wald Commits scm-commit at wald.intevation.org
Tue Apr 28 14:22:51 CEST 2015


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1430223767 -7200
# Node ID a83d519155abfc24c2a1c15034fb21674da4f7b2
# Parent  1083cb887ffb074b8c3675ba63ce17c85376188e
(issue1754) Do not base smoothing radius on calculation range

    Using the calculation parameters for startkm and endkm in the
    case that the domain axis had the default extend caused weird
    behavior when zooming and led to too large radius values for
    most data that only had valid values on a subset of the caluclation
    range.

diff -r 1083cb887ffb -r a83d519155ab artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java	Mon Apr 27 17:35:28 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java	Tue Apr 28 14:22:47 2015 +0200
@@ -80,14 +80,6 @@
             context.putContextValue("endkm", getXBounds(0).getUpper());
             context.putContextValue("bounds_defined", true);
         }
-        else if (getXBounds(0) == null && getDomainAxisRange() == null) {
-            RangeAccess access = new RangeAccess(artifact);
-            if (access.hasFrom() && access.hasTo()) {
-                context.putContextValue("startkm", access.getFrom());
-                context.putContextValue("endkm", access.getTo());
-                context.putContextValue("bounds_defined", true);
-            }
-        }
         else if (getXBounds(0) == null && getDomainAxisRange() != null){
             RangeAccess access = new RangeAccess(artifact);
             if (access.hasFrom() && access.hasTo()) {
@@ -99,6 +91,12 @@
                 context.putContextValue("bounds_defined", true);
             }
         }
+        /*
+        else if (getXBounds(0) == null && getDomainAxisRange() == null) {
+            .. In this case the automatic zoom of the diagram will provide
+            decent values for the zooom calculation.
+        }
+        */
         super.doOut(bundle, theme, visible);
     }
 }


More information about the Dive4Elements-commits mailing list