diff artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthFacet.java @ 8891:f431aec10d2c

Implemented access to bed measurements
author gernotbelger
date Wed, 14 Feb 2018 19:06:21 +0100
parents 7a8c12706834
children
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthFacet.java	Wed Feb 14 18:45:42 2018 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flowdepth/FlowDepthFacet.java	Wed Feb 14 19:06:21 2018 +0100
@@ -47,41 +47,13 @@
 
         final FlowDepthCalculationResults data = (FlowDepthCalculationResults) res.getData();
 
-        final FlowDepthCalculationResult result = data.getResults().get(this.index);
-
-        // FIXME: variable mean computation depending on current scale
-
-        // Double start = (Double)context.getContextValue("startkm");
-        // Double end = (Double)context.getContextValue("endkm");
-        // if(start != null && end != null) {
-        // RiverContext fc = (RiverContext)context.globalContext();
-        // ZoomScale scales = (ZoomScale)fc.get("zoomscale");
-        // RiverAccess access = new RiverAccess((D4EArtifact)artifact);
-        // String river = access.getRiverName();
-        //
-        // double radius = scales.getRadius(river, start, end);
-        // FlowVelocityData oldData = data[index];
-        // FlowVelocityData newData = new FlowVelocityData();
-        // double[][] q = oldData.getQPoints();
-        // double[][] totalV = MovingAverage.weighted(oldData.getTotalChannelPoints(), radius);
-        // double[][] mainV = MovingAverage.weighted(oldData.getMainChannelPoints(), radius);
-        // double[][] tau = MovingAverage.weighted(oldData.getTauPoints(), radius);
-        // for(int j = 0; j < q[0].length; j++) {
-        // newData.addKM(q[0][j]);
-        // newData.addQ(q[1][j]);
-        // newData.addTauMain(tau[1][j]);
-        // newData.addVMain(mainV[1][j]);
-        // newData.addVTotal(totalV[1][j]);
-        // }
-        // return newData;
-        // }
-
-        return result;
+        return data.getResults().get(this.index);
     }
 
     /** Copy deeply. */
     @Override
     public Facet deepCopy() {
+        // FIXME: why not simply use the full constructor instead?
         final FlowDepthFacet copy = new FlowDepthFacet();
         // FIXME: why does DataFacet does not override set? Bad access to variables of parent!
         copy.set(this);

http://dive4elements.wald.intevation.org