[PATCH 1 of 2] Fixed approx char restaurated, findValue condition for zone name corrected

Wald Commits scm-commit at wald.intevation.org
Mon Jul 2 19:13:26 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1530550944 -7200
# Node ID b38be7ea53e2bec78d4c69587bd88112f87a2e86
# Parent  4f411c6ee3aec4c9fa9be05b1823d71e39782889
Fixed approx char restaurated, findValue condition for zone name corrected

diff -r 4f411c6ee3ae -r b38be7ea53e2 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/GaugeMainValueFinder.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/GaugeMainValueFinder.java	Mon Jul 02 17:40:39 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/GaugeMainValueFinder.java	Mon Jul 02 19:02:24 2018 +0200
@@ -38,7 +38,7 @@
 
     private final MainValueTypeKey keyType;
 
-    private final String approxPrefix = "ca."; // "\u2248" geht wohl nicht
+    private final String approxPrefix = "\u2248";
 
     private Entry<Double, MainValue> foundCeiling;
 
@@ -87,7 +87,8 @@
      * (name for an exact match, circa expression for +/- 10% match, less-than/between/greater-than expression otherwise)
      */
     public String findZoneName(final double value) {
-        if (!this.findValue(value))
+        this.findValue(value);
+        if (Double.isNaN(this.foundRelativeDistance))
             return "";
 
         // Clearly below or just (max. 10%) below lowest named value


More information about the Dive4Elements-commits mailing list