comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java @ 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 9e79e384aa8b
comparison
equal deleted inserted replaced
8047:c835f3cf098e 8048:cde6d2a9ec32
30 public static final int GF_TOTAL = 6; 30 public static final int GF_TOTAL = 6;
31 public static final int GF_BED_LOAD = 7; 31 public static final int GF_BED_LOAD = 7;
32 public static final int GF_SUSPENDED_LOAD = 8; 32 public static final int GF_SUSPENDED_LOAD = 8;
33 public static final int GF_MAX = 8; 33 public static final int GF_MAX = 8;
34 34
35 public static final int [] MEASUREMENT_STATION_GF = {
36 /* GF_COARSE */ Station.BED_LOAD,
37 /* GF_FINE_MIDDLE */ Station.BED_LOAD,
38 /* GF_SAND */ Station.BED_LOAD,
39 /* GF_SUSP_SAND */ Station.BED_LOAD,
40 /* GF_SUSP_SAND_BED */ Station.BED_LOAD,
41 /* GF_SUSP_SEDIMENT */ Station.SUSPENDED
42 };
43
44 public static final int measurementStationType(int grainFraction) {
45 return grainFraction < 0 || grainFraction >= MEASUREMENT_STATION_GF.length
46 ? Station.UNKNOWN
47 : MEASUREMENT_STATION_GF[grainFraction];
48 }
49
35 public static final int grainFractionIndex(String name) { 50 public static final int grainFractionIndex(String name) {
36 if ("coarse".equals(name)) return GF_COARSE; 51 if ("coarse".equals(name)) return GF_COARSE;
37 if ("fine_middle".equals(name)) return GF_FINE_MIDDLE; 52 if ("fine_middle".equals(name)) return GF_FINE_MIDDLE;
38 if ("sand".equals(name)) return GF_SAND; 53 if ("sand".equals(name)) return GF_SAND;
39 if ("susp_sand".equals(name)) return GF_SUSP_SAND; 54 if ("susp_sand".equals(name)) return GF_SUSP_SAND;
121 } 136 }
122 } // class SedimentLoad 137 } // class SedimentLoad
123 138
124 public static class Station implements Serializable { 139 public static class Station implements Serializable {
125 140
141 public static final int UNKNOWN = 0;
126 public static final int BED_LOAD = 1; 142 public static final int BED_LOAD = 1;
127 public static final int SUSPENDED = 2; 143 public static final int SUSPENDED = 2;
128 144
129 private double station; 145 private double station;
130 146

http://dive4elements.wald.intevation.org