changeset 3002:e54dd69d306f

FixA: Added method to classify fixing events for certain kms. flys-artifacts/trunk@4558 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 30 May 2012 13:46:13 +0000
parents 619fe13e2397
children e5e6363e6cba
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed May 30 13:03:22 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed May 30 13:46:13 2012 +0000
@@ -1,3 +1,9 @@
+2012-05-30	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java:
+	  Added method to find the Q sector of fixing column for a given km.
+	  Useful to classify fixing events at certain kms.
+
 2012-05-30	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/FixationArtifactAccess.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java	Wed May 30 13:03:22 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java	Wed May 30 13:46:13 2012 +0000
@@ -442,6 +442,15 @@
                 return result;
             }
 
+            public int findQSector(double km) {
+                for (SectorRange sector: sectors) {
+                    if (sector.inside(km)) {
+                        return sector.getSector();
+                    }
+                }
+                return -1;
+            }
+
             public void buildSectors(GaugeRange gauge, List<QRange> qRanges) {
 
                 for (QRange qRange: qRanges) {

http://dive4elements.wald.intevation.org