comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/ConstantXYDepth.java @ 1119:7c4f81f74c47

merged gnv-artifacts
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:00 +0200
parents f953c9a559d8
children
comparison
equal deleted inserted replaced
1027:fca4b5eb8d2f 1119:7c4f81f74c47
1 /*
2 * Copyright (c) 2010 by Intevation GmbH
3 *
4 * This program is free software under the LGPL (>=v2.1)
5 * Read the file LGPL.txt coming with the software for details
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
7 */
8
9 package de.intevation.gnv.math;
10
11 import com.vividsolutions.jts.geom.Coordinate;
12
13 /**
14 * Instances of the implementation return a constant value.
15 *
16 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
17 */
18 public class ConstantXYDepth
19 implements XYDepth
20 {
21 /**
22 * The constant depth.
23 */
24 protected double depth;
25
26 /**
27 * Default constructor. The constant depth = 0.
28 */
29 public ConstantXYDepth() {
30 }
31
32 /**
33 * Construtor to create a ConstantXYDepth with a given depth.
34 * @param depth The constant depth.
35 */
36 public ConstantXYDepth(double depth) {
37 this.depth = depth;
38 }
39
40 public double depth(Coordinate coordinate) {
41 return depth;
42 }
43 }
44 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org