diff backend/src/main/java/org/dive4elements/river/model/CrossSectionLine.java @ 8813:8abe94270f32

Do not filter cross section points for display. Filtering coordinates outside an extent probably aimed at omitting outliers from the diagram. This is obsolete and had the side effect of filtering the important point at x = 0.
author Tom Gottfried <tom@intevation.de>
date Fri, 28 Apr 2017 19:03:56 +0200
parents 9d2e69f971f5
children 0a5239a1e46e
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/model/CrossSectionLine.java	Thu Apr 13 15:25:26 2017 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/CrossSectionLine.java	Fri Apr 28 19:03:56 2017 +0200
@@ -39,9 +39,6 @@
 
     public static final double EPSILON   = 1e-4;
 
-    public static final double TOO_SMALL = 0.2;
-    public static final double TOO_BIG   = 2500;
-
     private Integer                 id;
     private Double                  km;
     private CrossSection            crossSection;
@@ -63,16 +60,6 @@
         };
 
 
-    public static final boolean isValid(double x) {
-        x = Math.abs(x);
-        return x > TOO_SMALL && x < TOO_BIG;
-    }
-
-    public static final boolean isValid(Point2D p) {
-        return isValid(p.getX()) && isValid(p.getY());
-    }
-
-
     public CrossSectionLine() {
     }
 
@@ -139,9 +126,7 @@
         for (CrossSectionPoint p: linePoints) {
             double x = p.getX().doubleValue();
             double y = p.getY().doubleValue();
-            if (isValid(x) && isValid(y)) {
-                points.add(new Point2D.Double(x, y));
-            }
+            points.add(new Point2D.Double(x, y));
         }
 
         return points;

http://dive4elements.wald.intevation.org