changeset 4948:64139914e446

Fixed epsilon calc in ATExporter.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 31 Jan 2013 20:11:30 +0100 (2013-01-31)
parents 7669747d22f2
children 53be73133104
files flys-artifacts/src/main/java/de/intevation/flys/exports/ATExporter.java
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ATExporter.java	Thu Jan 31 20:09:37 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ATExporter.java	Thu Jan 31 20:11:30 2013 +0100
@@ -3,7 +3,6 @@
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.IOException;
-import java.util.List;
 
 import org.w3c.dom.Document;
 
@@ -92,7 +91,7 @@
         double[] kms = rangeAccess.getLocations();
 
         Gauge gauge = river.determineGaugeByPosition(kms[0]);
-        if (kms[0] == gauge.getStation().doubleValue() + 1e-4) {
+        if (Math.abs(kms[0] - gauge.getStation().doubleValue()) < 1e-4) {
             // at gauge.
             TimeInterval interval =
                 gauge.fetchMasterDischargeTable().getTimeInterval();

http://dive4elements.wald.intevation.org