changeset 7861:c288309a5dcb

Fixed getPeer for depth. Select with a small epsilon, not extact match.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 08 May 2014 13:46:32 +0200
parents f4dffc7d1d60
children cdef048c4ac5
files backend/src/main/java/org/dive4elements/river/importer/ImportDepth.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/ImportDepth.java	Thu May 08 13:45:23 2014 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/ImportDepth.java	Thu May 08 13:46:32 2014 +0200
@@ -52,11 +52,11 @@
 
             Query query = session.createQuery(
                 "from Depth where " +
-                "   lower=:lower and " +
-                "   upper=:upper");
+                "   lower between :lower - 0.0001f and :lower + 0.00001f and " +
+                "   upper between :upper - 0.0001f and :upper + 0.00001f");
 
-            query.setParameter("lower", lower);
-            query.setParameter("upper", upper);
+            query.setParameter("lower", lower.floatValue());
+            query.setParameter("upper", upper.floatValue());
 
             List<Depth> depths = query.list();
 

http://dive4elements.wald.intevation.org