Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java @ 3106:23de6d678fba
FixA: Store into QWs if they are interpolated.
flys-artifacts/trunk@4705 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 19 Jun 2012 14:01:47 +0000 |
parents | d7b0f52d6d04 |
children | cbf308f5c41b |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java Tue Jun 19 13:55:14 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/fixings/FixCalculation.java Tue Jun 19 14:01:47 2012 +0000 @@ -166,8 +166,9 @@ double [] kms = DoubleUtil.explode(from, to, step / 1000.0); - final double [] qs = new double[eventColumns.size()]; - final double [] ws = new double[qs.length]; + final double [] qs = new double[eventColumns.size()]; + final double [] ws = new double[qs.length]; + final boolean [] interpolated = new boolean[ws.length]; Fitting.QWDFactory qwdFactory = new Fitting.QWDFactory() { @Override @@ -182,6 +183,7 @@ q, w, column.getDescription(), column.getDate(), + interpolated[i], 0d); } } @@ -218,8 +220,7 @@ // Fill Qs and Ws from event columns. for (int j = 0; j < ws.length; ++j) { - boolean interpolated = - eventColumns.get(j).getQW(km, qs, ws, j); + interpolated[j] = eventColumns.get(j).getQW(km, qs, ws, j); // TODO: mark as interpolated. } @@ -392,7 +393,8 @@ Date date = column.getDate(); String description = column.getDescription(); - QWD qwd = new QWD(wq[1], wq[0], description, date, dw); + QWD qwd = new QWD( + wq[1], wq[0], description, date, true, dw); qwds.add(qwd); @@ -417,7 +419,7 @@ String avgDescription = "avg.deltawt." + qSector; QWD avgQWD = new QWD( - avgQ, avgW, avgDescription, avgDate, avgDw); + avgQ, avgW, avgDescription, avgDate, true, avgDw); qSectorAverages[qSector] = avgQWD; }