Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/MainValuesQFacet.java @ 7489:3e9961dcbf9a
Removed redundant lookup for km in call context.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 01 Nov 2013 11:50:11 +0100 |
parents | f206f6049b2b |
children | 4de4b19b6be6 |
comparison
equal
deleted
inserted
replaced
7488:1890bd524d27 | 7489:3e9961dcbf9a |
---|---|
113 if (providers.size() < 1) { | 113 if (providers.size() < 1) { |
114 logger.warn("Could not find durationcurve data provider."); | 114 logger.warn("Could not find durationcurve data provider."); |
115 // Do we have a current km in context? | 115 // Do we have a current km in context? |
116 // If so, we are likely fetching data for a navigable | 116 // If so, we are likely fetching data for a navigable |
117 // diagram (i.e. in fixation branch). | 117 // diagram (i.e. in fixation branch). |
118 if (context.getContextValue(FixChartGenerator.CURRENT_KM) != null) { | 118 Object xkm = context.getContextValue(FixChartGenerator.CURRENT_KM); |
119 Double ckm = (Double) context.getContextValue(FixChartGenerator.CURRENT_KM); | 119 if (xkm != null) { |
120 Double ckm = (Double)xkm; | |
120 // Return linearly interpolated values, in m if not at gauge, | 121 // Return linearly interpolated values, in m if not at gauge, |
121 // in cm if at gauge. | 122 // in cm if at gauge. |
122 qs = mvArtifact.getMainValuesQ(new double[] {ckm}); | 123 qs = mvArtifact.getMainValuesQ(new double[] {ckm}); |
123 } | 124 } |
124 } | 125 } |