comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/QueriedXYDepth.java @ 805:bb7afd783321

Removed trailing whitespace. Added more javadoc. gnv-artifacts/trunk@887 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 08 Apr 2010 11:31:44 +0000
parents d766fe2d917a
children 05bf8534a35a
comparison
equal deleted inserted replaced
804:9058c08eac3a 805:bb7afd783321
19 import java.util.Collection; 19 import java.util.Collection;
20 20
21 import org.apache.log4j.Logger; 21 import org.apache.log4j.Logger;
22 22
23 /** 23 /**
24 * This implementation uses the geo backend to query a depth via
25 * a raster layer stored in the database.
26 *
24 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> 27 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
25 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> 28 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
26 */ 29 */
27 public class QueriedXYDepth implements XYDepth { 30 public class QueriedXYDepth
28 31 implements XYDepth
29 /** 32 {
30 * the logger, used to log exceptions and additonaly information
31 */
32 private static Logger log = Logger.getLogger(QueriedXYDepth.class); 33 private static Logger log = Logger.getLogger(QueriedXYDepth.class);
33 34
34 private static final String queryID = "rasterQuery"; 35 private static final String queryID = "rasterQuery";
35 36
36 private QueryExecutor queryExecutor; 37 private QueryExecutor queryExecutor;
39 40
40 private RasterObject last; 41 private RasterObject last;
41 42
42 private int interpolation; 43 private int interpolation;
43 44
45 /**
46 * Default construtor. Interpolation method is bilinear.
47 */
44 public QueriedXYDepth() { 48 public QueriedXYDepth() {
45 this(RasterObject.BILINEAR); 49 this(RasterObject.BILINEAR);
46 } 50 }
47 51
52 /**
53 * Constructor to create a QueriedXYDepth with a given interpolation
54 * method.
55 * @param interpolation The interpolation method.
56 */
48 public QueriedXYDepth(int interpolation) { 57 public QueriedXYDepth(int interpolation) {
49 this.interpolation = interpolation; 58 this.interpolation = interpolation;
50 rasterData = new ArrayList<SoftReference<RasterObject>>(); 59 rasterData = new ArrayList<SoftReference<RasterObject>>();
51 queryExecutor = QueryExecutorFactory.getInstance().getQueryExecutor(); 60 queryExecutor = QueryExecutorFactory.getInstance().getQueryExecutor();
52 } 61 }
53 62
54 /**
55 * @see de.intevation.gnv.math.XYDepth#depth(com.vividsolutions.jts.geom.Coordinate)
56 */
57 public double depth(Coordinate coordinate) { 63 public double depth(Coordinate coordinate) {
58 double resultValue = Double.NaN; 64 double resultValue = Double.NaN;
59 65
60 RasterObject ro = getRasterObject(coordinate); 66 RasterObject ro = getRasterObject(coordinate);
61 67

http://dive4elements.wald.intevation.org