changeset 8420:8a14605fb64a

Removed morpho width from bed height diffs.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 17 Oct 2014 12:50:35 +0200
parents d7d74392cc46
children 0fa963038c61
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphMinFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphSubFacet.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearResult.java artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferenceJRDataSource.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java
diffstat 7 files changed, 46 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java	Fri Oct 17 11:44:01 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java	Fri Oct 17 12:50:35 2014 +0200
@@ -76,8 +76,8 @@
         TDoubleArrayList gap       = new TDoubleArrayList(size);
         TDoubleArrayList heights1  = new TDoubleArrayList(size);
         TDoubleArrayList heights2  = new TDoubleArrayList(size);
-        TDoubleArrayList morphs1   = new TDoubleArrayList(size);
-        TDoubleArrayList morphs2   = new TDoubleArrayList(size);
+        //TDoubleArrayList morphs1   = new TDoubleArrayList(size);
+        //TDoubleArrayList morphs2   = new TDoubleArrayList(size);
 
         Integer range = null;
         if (s1.getYear() != null && s2.getYear() != null) {
@@ -88,8 +88,8 @@
             double station = stations.getQuick(i);
             double h1      = s1.getHeight(station);
             double h2      = s2.getHeight(station);
-            double m1      = s1.getWidth(station);
-            double m2      = s2.getWidth(station);
+            //double m1      = s1.getWidth(station);
+            //double m2      = s2.getWidth(station);
             double hDiff   = h1 - h2;
 
             if (!Double.isNaN(hDiff)) {
@@ -109,8 +109,8 @@
                 }
                 heights1.add(h1);
                 heights2.add(h2);
-                morphs1.add(m1);
-                morphs2.add(m2);
+                //morphs1.add(m1);
+                //morphs2.add(m2);
             }
         }
         return new BedDiffYearResult(
@@ -118,8 +118,8 @@
             diffRes,
             heights1,
             heights2,
-            morphs1,
-            morphs2,
+            //morphs1,
+            //morphs2,
             soundings,
             absolute,
             gap,
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphMinFacet.java	Fri Oct 17 11:44:01 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphMinFacet.java	Fri Oct 17 12:50:35 2014 +0200
@@ -38,10 +38,12 @@
         BedDiffYearResult[] resultData =
             (BedDiffYearResult[]) res.getData(); // TODO CAST TO SPECIFIC CLASS
 
+        /*
         if (resultData != null && resultData.length > index) {
             BedDiffYearResult data = resultData[index];
             return data.getMorphWidth1Data();
         }
+        */
         return null;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphSubFacet.java	Fri Oct 17 11:44:01 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffMorphSubFacet.java	Fri Oct 17 12:50:35 2014 +0200
@@ -38,10 +38,12 @@
         BedDiffYearResult[] resultData =
             (BedDiffYearResult[]) res.getData(); // TODO CAST TO SPECIFIC CLASS
 
+        /*
         if (resultData != null && resultData.length > index) {
             BedDiffYearResult data = resultData[index];
             return data.getMorphWidth2Data();
         }
+        */
         return null;
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearResult.java	Fri Oct 17 11:44:01 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffYearResult.java	Fri Oct 17 12:50:35 2014 +0200
@@ -18,8 +18,8 @@
     protected TDoubleArrayList diffsPerYear;
     protected TDoubleArrayList dataGap;
     protected TDoubleArrayList soundingWidth;
-    protected TDoubleArrayList morphWidth1;
-    protected TDoubleArrayList morphWidth2;
+    //protected TDoubleArrayList morphWidth1;
+    //protected TDoubleArrayList morphWidth2;
     protected Integer start;
     protected Integer end;
     protected String nameFirst;
@@ -32,8 +32,8 @@
         this.diffsPerYear = new TDoubleArrayList();
         this.dataGap = new TDoubleArrayList();
         this.soundingWidth = new TDoubleArrayList();
-        this.morphWidth1 = new TDoubleArrayList();
-        this.morphWidth2 = new TDoubleArrayList();
+        //this.morphWidth1 = new TDoubleArrayList();
+        //this.morphWidth2 = new TDoubleArrayList();
     }
 
     /**
@@ -48,8 +48,8 @@
         TDoubleArrayList differences,
         TDoubleArrayList heights1,
         TDoubleArrayList heights2,
-        TDoubleArrayList morphWidth1,
-        TDoubleArrayList morphWidth2,
+        //TDoubleArrayList morphWidth1,
+        //TDoubleArrayList morphWidth2,
         TDoubleArrayList soundingWidth,
         TDoubleArrayList diffsPerYear,
         TDoubleArrayList dataGap,
@@ -64,8 +64,8 @@
         this.diffsPerYear = diffsPerYear;
         this.dataGap = dataGap;
         this.soundingWidth = soundingWidth;
-        this.morphWidth1 = morphWidth1;
-        this.morphWidth2 = morphWidth2;
+        //this.morphWidth1 = morphWidth1;
+        //this.morphWidth2 = morphWidth2;
         this.start = start;
         this.end = end;
         this.nameFirst = nameFirst;
@@ -82,6 +82,7 @@
         return this.dataGap;
     }
 
+    /*
     public TDoubleArrayList getMorphWidth1() {
         return this.morphWidth1;
     }
@@ -89,6 +90,7 @@
     public TDoubleArrayList getMorphWidth2() {
         return this.morphWidth2;
     }
+    */
 
     public TDoubleArrayList getSoundingWidth() {
         return this.soundingWidth;
@@ -130,6 +132,7 @@
         return this.idSecond;
     }
 
+    /*
     public void addMorphWidth1(double value) {
         this.morphWidth1.add(value);
     }
@@ -137,6 +140,7 @@
     public void addMorphWidth2(double value) {
         this.morphWidth2.add(value);
     }
+    */
 
     public void addSoundingWidth(double value) {
         this.soundingWidth.add(value);
@@ -146,6 +150,7 @@
         this.diffsPerYear.add(value);
     }
 
+    /*
     public double[][] getMorphWidth1Data() {
         return new double[][] {
             kms.toNativeArray(),
@@ -159,6 +164,7 @@
             morphWidth2.toNativeArray()
         };
     }
+    */
 
     public double[][] getSoundingWidthData() {
         return new double[][] {
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferenceJRDataSource.java	Fri Oct 17 11:44:01 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferenceJRDataSource.java	Fri Oct 17 12:50:35 2014 +0200
@@ -68,12 +68,14 @@
         else if ("diffheader".equals(fieldName)) {
             value = metaData.get("diffheader");
         }
+        /*
         else if ("morph1header".equals(fieldName)) {
             value = metaData.get("morph1header");
         }
         else if ("morph2header".equals(fieldName)) {
             value = metaData.get("morph2header");
         }
+        */
         else if ("km".equals(fieldName)) {
             value = data.get(index)[0];
         }
@@ -83,12 +85,14 @@
         else if ("diff".equals(fieldName)) {
             value = data.get(index)[2];
         }
+        /*
         else if ("morph1".equals(fieldName)) {
             value = data.get(index)[3];
         }
         else if ("morph2".equals(fieldName)) {
             value = data.get(index)[4];
         }
+        */
         return value;
     }
 }
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java	Fri Oct 17 11:44:01 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/DifferencesState.java	Fri Oct 17 12:50:35 2014 +0200
@@ -144,6 +144,7 @@
                     ComputeType.ADVANCE,
                     stateId,
                     hash));
+                /*
                 newFacets.add(new BedDiffMorphMinFacet(
                     idx,
                     BED_DIFFERENCE_MORPH_WIDTH1,
@@ -158,6 +159,7 @@
                     ComputeType.ADVANCE,
                     stateId,
                     hash));
+                */
                 newFacets.add(new BedDiffHeightMinFacet(
                     idx,
                     BED_DIFFERENCE_YEAR_HEIGHT1,
--- a/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java	Fri Oct 17 11:44:01 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/minfo/BedDifferenceExporter.java	Fri Oct 17 12:50:35 2014 +0200
@@ -59,11 +59,13 @@
     private static final String CSV_HEADER_DIFF_PAIR =
         "export.minfo.beddifference.diff.pair";
 
+    /*
     private static final String CSV_HEADER_MORPH1 =
         "export.minfo.beddifference.morph1";
 
     private static final String CSV_HEADER_MORPH2 =
         "export.minfo.beddifference.morph2";
+    */
 
     public static final String JASPER_FILE =
         "export.minfo.beddifference.pdf.file";
@@ -91,15 +93,15 @@
                 BedDiffYearResult yResult = (BedDiffYearResult) result;
                 String desc = result.getDiffDescription();
                 double[][] kms = yResult.getDifferencesData();
-                double[][] morph1 = yResult.getMorphWidth1Data();
-                double[][] morph2 = yResult.getMorphWidth2Data();
+                //double[][] morph1 = yResult.getMorphWidth1Data();
+                //double[][] morph2 = yResult.getMorphWidth2Data();
                 for (int j = 0; j < kms[0].length; j++) {
                     writer.writeNext(new String[] {
                         kmf.format(kms[0][j]),
                         desc,
                         mf.format(kms[1][j]),
-                        mf.format(morph1[1][j]),
-                        mf.format(morph2[1][j]),
+                        //mf.format(morph1[1][j]),
+                        //mf.format(morph2[1][j]),
                         });
                 }
             }
@@ -162,10 +164,12 @@
         source.addMetaData("diffpairheader",
                 msg(CSV_HEADER_DIFF_PAIR, "Difference pair"));
         source.addMetaData("diffheader", msg(CSV_HEADER_DIFF, "cm"));
+        /*
         source.addMetaData("morph1header", 
                 msg(CSV_HEADER_MORPH1, "Morph. active width minuend"));
         source.addMetaData("morph2header", 
                 msg(CSV_HEADER_MORPH2, "Morph. active width subtrahend"));
+                */
     }
 
 
@@ -177,11 +181,13 @@
             header.add(msg(CSV_HEADER_KM, "km"));
             header.add(msg(CSV_HEADER_DIFF_PAIR, "difference pair"));
             header.add(msg(CSV_HEADER_DIFF, "cm"));
+            /*
             if (results.length > 0 &&
                 results[0] instanceof BedDiffYearResult) {
                 header.add(msg(CSV_HEADER_MORPH1, "morph width minuend [m]"));
                 header.add(msg(CSV_HEADER_MORPH2, "morph width subtrahend [m]"));
             }
+            */
         }
         writer.writeNext(header.toArray(new String[header.size()]));
     }
@@ -196,15 +202,15 @@
             BedDiffYearResult yResult = (BedDiffYearResult) result;
             double[][] kms = result.getDifferencesData();
             String desc = result.getDiffDescription();
-            double[][] morph1 = yResult.getMorphWidth1Data();
-            double[][] morph2 = yResult.getMorphWidth2Data();
+            //double[][] morph1 = yResult.getMorphWidth1Data();
+            //double[][] morph2 = yResult.getMorphWidth2Data();
             for (int j = 0; j < kms[0].length; j++) {
                 source.addData(new String[] {
                     kmf.format(kms[0][j]),
                     desc,
                     mf.format(kms[1][j]),
-                    mf.format(morph1[1][j]),
-                    mf.format(morph2[1][j])
+                    //mf.format(morph1[1][j]),
+                    //mf.format(morph2[1][j])
                     });
             }
         }

http://dive4elements.wald.intevation.org