changeset 7341:588b02a4078a double-precision

Comments.
author Tom Gottfried <tom@intevation.de>
date Tue, 15 Oct 2013 19:18:44 +0200
parents 2ce7bacc940f
children c9b9176b0530
files backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java	Tue Oct 15 18:41:55 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java	Tue Oct 15 19:18:44 2013 +0200
@@ -192,7 +192,7 @@
 
                     if (aktAbfluesse != null) {
                         if (kmHist1 != null && kmHist2 != null
-                        && kmHist1.compareTo(kmHist2) < 0) {
+                        && kmHist1.compareTo(kmHist2) < 0) { // stations descending in file
                             BigDecimal t = minKm; minKm = maxKm; maxKm = t;
                         }
                         addInterval(minKm, maxKm, aktAbfluesse);
@@ -341,6 +341,7 @@
                     kmHist2 = kmHist1;
                     kmHist1 = kaem;
 
+                    // iteratively determine actual km-range
                     if (kaem.compareTo(minKm) < 0) {
                         minKm = kaem;
                     }
@@ -392,7 +393,7 @@
             wst.setUnit(new ImportUnit(einheit));
 
             if (kmHist1 != null && kmHist2 != null
-            && kmHist1.compareTo(kmHist2) < 0) {
+            && kmHist1.compareTo(kmHist2) < 0) { // stations descending in file
                 BigDecimal t = minKm; minKm = maxKm; maxKm = t;
             }
             addInterval(minKm, maxKm, aktAbfluesse);

http://dive4elements.wald.intevation.org