[PATCH 1 of 6] Include the calculation borders in the official line export

Wald Commits scm-commit at wald.intevation.org
Thu Jul 18 17:54:01 CEST 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1374153765 -7200
# Node ID ddef735db96a606143aecc9813cce7a18a6810b2
# Parent  d3df835be006bdab087a6a6d089211ceb84d4c49
Include the calculation borders in the official line export.

diff -r d3df835be006 -r ddef735db96a artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Thu Jul 18 14:51:26 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java	Thu Jul 18 15:22:45 2013 +0200
@@ -393,14 +393,14 @@
         if (first > last) {
             for (int i = wqkms.size() - 1; i >= 0; i--) {
                 dp = wqkms.get(i, dp);
-                if (dp[2] < first && dp[2] > last) {
+                if (dp[2] <= first + 1E-5 && dp[2] > last - 1E-5) {
                     filtered.add(dp[0], dp[1], dp[2]);
                 }
             }
         } else {
             for (int i = 0; i < wqkms.size(); i++) {
                 dp = wqkms.get(i, dp);
-                if (dp[2] < last && dp[2] > first) {
+                if (dp[2] < last + 1E-5 && dp[2] > first - 1E-5) {
                     filtered.add(dp[0], dp[1], dp[2]);
                 }
             }


More information about the Dive4elements-commits mailing list