[PATCH 1 of 9] Add river elevation model to bed diff chart export

Wald Commits scm-commit at wald.intevation.org
Thu Jul 3 12:31:29 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1404379661 -7200
# Branch facet-metadata
# Node ID 9f42d161886beb56094d6c75326681b5a18c4866
# Parent  2f88a98d9aaec695615e7f3f17873429afe1d801
Add river elevation model to bed diff chart export.

diff -r 2f88a98d9aae -r 9f42d161886b artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffFilterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffFilterFacet.java	Wed Jul 02 15:54:23 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffFilterFacet.java	Thu Jul 03 11:27:41 2014 +0200
@@ -20,6 +20,7 @@
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.math.MovingAverage;
 import org.dive4elements.river.artifacts.model.ZoomScale;
+import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
 
@@ -60,6 +61,9 @@
             double radius = scales.getRadius(river, start, end);
             BedDiffYearResult oldData = data[index];
             double[][] diffs = MovingAverage.weighted(oldData.getDifferencesData(), radius);
+            this.metaData.put(
+                Resources.getMsg(context.getMeta(),
+                    "chart.subtitle.radius", new Object[] { radius }), "");
             return diffs;
         }
         return null;
diff -r 2f88a98d9aae -r 9f42d161886b artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFilterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFilterFacet.java	Wed Jul 02 15:54:23 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightMinFilterFacet.java	Thu Jul 03 11:27:41 2014 +0200
@@ -20,6 +20,7 @@
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.math.MovingAverage;
 import org.dive4elements.river.artifacts.model.ZoomScale;
+import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
 
@@ -60,6 +61,9 @@
             double radius = scales.getRadius(river, start, end);
             BedDiffYearResult oldData = data[index];
             double[][] heights = MovingAverage.weighted(oldData.getHeights1Data(), radius);
+            this.metaData.put(
+                Resources.getMsg(context.getMeta(),
+                    "chart.subtitle.radius", new Object[] { radius }), "");
             return heights;
         }
         return null;
diff -r 2f88a98d9aae -r 9f42d161886b artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFilterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFilterFacet.java	Wed Jul 02 15:54:23 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffHeightSubFilterFacet.java	Thu Jul 03 11:27:41 2014 +0200
@@ -20,6 +20,7 @@
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.math.MovingAverage;
 import org.dive4elements.river.artifacts.model.ZoomScale;
+import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
 
@@ -60,6 +61,9 @@
             double radius = scales.getRadius(river, start, end);
             BedDiffYearResult oldData = data[index];
             double[][] heights = MovingAverage.weighted(oldData.getHeights2Data(), radius);
+            this.metaData.put(
+                Resources.getMsg(context.getMeta(),
+                    "chart.subtitle.radius", new Object[] { radius }), "");
             return heights;
         }
         return null;
diff -r 2f88a98d9aae -r 9f42d161886b artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFilterFacet.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFilterFacet.java	Wed Jul 02 15:54:23 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffPerYearFilterFacet.java	Thu Jul 03 11:27:41 2014 +0200
@@ -20,6 +20,7 @@
 import org.dive4elements.river.artifacts.model.DataFacet;
 import org.dive4elements.river.artifacts.math.MovingAverage;
 import org.dive4elements.river.artifacts.model.ZoomScale;
+import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
 
 
@@ -60,6 +61,9 @@
             double radius = scales.getRadius(river, start, end);
             BedDiffYearResult oldData = data[index];
             double[][] diffs = MovingAverage.weighted(oldData.getHeightPerYearData(), radius);
+            this.metaData.put(
+                Resources.getMsg(context.getMeta(),
+                    "chart.subtitle.radius", new Object[] { radius }), "");
             return diffs;
         }
         return null;


More information about the Dive4Elements-commits mailing list