changeset 8048:cde6d2a9ec32

Sediment Load: Added table to figure out where grain fractions are measured.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 17 Jul 2014 11:37:25 +0200
parents c835f3cf098e
children d49846f05108
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Thu Jul 17 11:19:59 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java	Thu Jul 17 11:37:25 2014 +0200
@@ -32,6 +32,21 @@
     public static final int GF_SUSPENDED_LOAD =  8;
     public static final int GF_MAX            =  8;
 
+    public static final int [] MEASUREMENT_STATION_GF = {
+        /* GF_COARSE         */ Station.BED_LOAD,
+        /* GF_FINE_MIDDLE    */ Station.BED_LOAD,
+        /* GF_SAND           */ Station.BED_LOAD,
+        /* GF_SUSP_SAND      */ Station.BED_LOAD,
+        /* GF_SUSP_SAND_BED  */ Station.BED_LOAD,
+        /* GF_SUSP_SEDIMENT  */ Station.SUSPENDED
+    };
+
+    public static final int measurementStationType(int grainFraction) {
+        return grainFraction < 0 || grainFraction >= MEASUREMENT_STATION_GF.length
+            ? Station.UNKNOWN
+            : MEASUREMENT_STATION_GF[grainFraction];
+    }
+
     public static final int grainFractionIndex(String name) {
         if ("coarse".equals(name))             return GF_COARSE;
         if ("fine_middle".equals(name))        return GF_FINE_MIDDLE;
@@ -123,6 +138,7 @@
 
     public static class Station implements Serializable {
 
+        public static final int UNKNOWN   = 0;
         public static final int BED_LOAD  = 1;
         public static final int SUSPENDED = 2;
 

http://dive4elements.wald.intevation.org