Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java @ 8362:839032ac1523
Purge obsolete representation of reference system for discharge tables.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 01 Oct 2014 15:54:47 +0200 |
parents | d3a4b0d5bcd8 |
children | 0a5239a1e46e |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java Wed Oct 01 15:42:55 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/WQ.java Wed Oct 01 15:54:47 2014 +0200 @@ -121,23 +121,15 @@ * If a conversion takes place converted is set to true */ public static WQ getFixedWQforExportAtGauge(WQ wq, BigDecimal datum) { - if (wq.getReferenceSystem() == W.CENTIMETER_AT_GAUGE) { - // Do nothing - return wq; - } // If we convert we work on a copy to avoid side effects. WQ ret = new WQ(wq.size(), wq.getName()); - ret.setReferenceSystem(W.CENTIMETER_AT_GAUGE); - // When we convert and have a datum we have a calculated - // result at a gauge so we must subtract the datum. double subtractDatum = datum == null ? 0 : datum.doubleValue(); double [] data = new double[8]; for (int i = 0, WQ = wq.size(); i < WQ; i++) { wq.get(i, data); ret.add((data[0] - subtractDatum)*100d, data[1]); } - log.debug("Converted W values to centimeter and substracted: " + subtractDatum); return ret; } }