comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/ExtremeAccess.java @ 4333:2d3f8af87b7b

ExtremeAccess: Added helper method to find the values for (the range of) a km.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 31 Oct 2012 13:45:14 +0100
parents 0545002e112c
children f8217f1fef2e
comparison
equal deleted inserted replaced
4332:0545002e112c 4333:2d3f8af87b7b
110 } 110 }
111 111
112 return function; 112 return function;
113 } 113 }
114 114
115
116 /** Find first RangeWithValues for which the given location
117 * is within the range and return its values.
118 * @return values of first suitable rangewithvalues or null.
119 */
120 public double[] getValuesForRange(double location) {
121 logger.debug("ExtemeAcces.getValuesForRange");
122 for (RangeWithValues rangeValues: getRanges()) {
123 if (rangeValues.inside(location)) {
124 return rangeValues.getValues();
125 }
126 }
127 return null;
128 }
129
130
115 public List<RangeWithValues> getRanges() { 131 public List<RangeWithValues> getRanges() {
116 132
117 if (ranges == null) { 133 if (ranges == null) {
118 String rangesS = getString("ranges"); 134 String rangesS = getString("ranges");
119 if (rangesS == null) { 135 if (rangesS == null) {

http://dive4elements.wald.intevation.org