[PATCH 1 of 6] Use old names for SedimentloadDataFractions and add average fraction
Wald Commits
scm-commit at wald.intevation.org
Mon Aug 25 20:03:40 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1408989480 -7200
# Node ID bbad52b073a44018c5214552b8cc28a5987e34ba
# Parent 306a16d3ac2ef19c672be8abde65359346ce4ea4
Use old names for SedimentloadDataFractions and add average fraction
diff -r 306a16d3ac2e -r bbad52b073a4 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java Mon Aug 25 17:28:48 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java Mon Aug 25 19:58:00 2014 +0200
@@ -31,7 +31,8 @@
public static final int GF_TOTAL = 6;
public static final int GF_BED_LOAD = 7;
public static final int GF_SUSPENDED_LOAD = 8;
- public static final int GF_MAX = 8;
+ public static final int GF_AVERAGE = 9;
+ public static final int GF_MAX = 9;
public static final int [] MEASUREMENT_STATION_GF = {
/* GF_COARSE */ Station.BED_LOAD,
@@ -61,6 +62,7 @@
if ("total".equals(name)) return GF_TOTAL;
if ("bed_load".equals(name)) return GF_BED_LOAD;
if ("suspended_load".equals(name)) return GF_SUSPENDED_LOAD;
+ if ("average".equals(name)) return GF_AVERAGE;
return GF_UNKNOWN;
}
diff -r 306a16d3ac2e -r bbad52b073a4 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java Mon Aug 25 17:28:48 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadDataCalculation.java Mon Aug 25 19:58:00 2014 +0200
@@ -91,6 +91,10 @@
SedimentLoadData.GF_SUSP_SEDIMENT
};
+ public static final int [] AVERAGE_FLYS = {
+ SedimentLoadData.GF_AVERAGE
+ };
+
public static final class GrainFraction {
private String description;
private int [] grainFractions;
@@ -113,19 +117,21 @@
} // class GrainFraction
public static final GrainFraction [] GRAIN_FRACTIONS = {
- // TODO: i18n
- GrainFraction.make("minfo.total.load.flys", TOTAL_LOAD_FLYS),
- GrainFraction.make("minfo.bed.load.flys", BED_LOAD_FLYS),
- GrainFraction.make("minfo.bed.load.susp.sand.flys", BED_LOAD_SUSP_SAND_FLYS),
- GrainFraction.make("minfo.total.load.bfg", TOTAL_LOAD_BFG),
- GrainFraction.make("minfo.bed.load.bfg", BED_LOAD_BFG),
- GrainFraction.make("minfo.suspended.load.bfg", SUSPENDED_LOAD_BFG),
- GrainFraction.make("minfo.coarse.flys", COARSE_FLYS),
- GrainFraction.make("minfo.fine.middle.flys", FINE_MIDDLE_FLYS),
- GrainFraction.make("minfo.sand.flys", SAND_FLYS) ,
- GrainFraction.make("minfo.susp.sand.flys", SUSP_SAND_FLYS),
- GrainFraction.make("minfo.susp.sand.bed.flys", SUSP_SAND_BED_FLYS),
- GrainFraction.make("minfo.susp.sediment.flys", SUSP_SEDIMENT_FLYS),
+ // TODO: i18n for bfg parts
+ // Grain fraction names are alignt to the grain_fractions table
+ GrainFraction.make("total", TOTAL_LOAD_FLYS),
+ GrainFraction.make("bed_load", BED_LOAD_FLYS),
+ GrainFraction.make("susp_sand_bed", BED_LOAD_SUSP_SAND_FLYS),
+ GrainFraction.make("total.bfg", TOTAL_LOAD_BFG),
+ GrainFraction.make("bed_load.bfg", BED_LOAD_BFG),
+ GrainFraction.make("suspended_load.bfg", SUSPENDED_LOAD_BFG),
+ GrainFraction.make("coarse", COARSE_FLYS),
+ GrainFraction.make("fine_middle", FINE_MIDDLE_FLYS),
+ GrainFraction.make("sand", SAND_FLYS) ,
+ GrainFraction.make("susp_sand", SUSP_SAND_FLYS),
+ GrainFraction.make("susp_sand_bed", SUSP_SAND_BED_FLYS),
+ GrainFraction.make("suspended_sediment", SUSP_SEDIMENT_FLYS),
+ GrainFraction.make("average", AVERAGE_FLYS),
};
public static class Sum implements Value.Visitor {
More information about the Dive4Elements-commits
mailing list