diff flys-aft/src/main/java/de/intevation/aft/River.java @ 4753:a310aceb2e51

Fetch calculation range (Berechnungsstrecke) for FLYS rivers, too.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 03 Jan 2013 14:19:45 +0100
parents b195fede1c3b
children 04377ccef10a
line wrap: on
line diff
--- a/flys-aft/src/main/java/de/intevation/aft/River.java	Thu Jan 03 11:43:16 2013 +0100
+++ b/flys-aft/src/main/java/de/intevation/aft/River.java	Thu Jan 03 14:19:45 2013 +0100
@@ -20,9 +20,19 @@
 
     protected String name;
 
+    protected double from;
+    protected double to;
+
     public River() {
     }
 
+    public River(int id1, String name, double from, double to) {
+        super(id1);
+        this.name = name;
+        this.from = from;
+        this.to   = to;
+    }
+
     public River(int id1, int id2, String name) {
         super(id1, id2);
         this.name = name;
@@ -32,6 +42,25 @@
         return name;
     }
 
+    public double getFrom() {
+        return from;
+    }
+
+    public void setFrom(double from) {
+        this.from = from;
+    }
+
+    public double getTo() {
+        return to;
+    }
+
+    public void setTo(double to) {
+        this.to = to;
+    }
+
+    public boolean inside(double x) {
+        return x >= from && x <= to;
+    }
 
     public boolean sync(SyncContext context) throws SQLException {
         log.info("sync river: " + this);

http://dive4elements.wald.intevation.org