comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/HeightValue.java @ 433:828df3ddb758

Added interpolation capabilities along z axis to XYColumns. gnv-artifacts/trunk@481 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 23 Dec 2009 12:20:25 +0000
parents bed9735adf84
children c4156275c1e1
comparison
equal deleted inserted replaced
432:6a70e8883307 433:828df3ddb758
1 package de.intevation.gnv.math; 1 package de.intevation.gnv.math;
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
4 4
5 import java.util.Comparator;
6
5 /** 7 /**
6 * @author Ingo Weinzierl <ingo.weinzierl@intevation.de> 8 * @author Ingo Weinzierl <ingo.weinzierl@intevation.de>
9 * @author Sascha L. Teichmann <sascha.teichmann@intevation.de>
7 */ 10 */
8 public class HeightValue 11 public class HeightValue
9 implements Serializable 12 implements Serializable
10 { 13 {
11 private double z; 14 public static final Comparator INV_Z_COMPARATOR = new Comparator() {
12 private double v; 15 public int compare(Object a, Object b) {
13 private int k; 16 HeightValue ha = (HeightValue)a;
17 HeightValue hb = (HeightValue)b;
18 if (ha.z > hb.z) return -1;
19 if (ha.z < hb.z) return +1;
20 return 0;
21 }
22 };
14 23
24 public double z;
25 public double v;
26 public int k;
15 27
16 public HeightValue(double z, double v, int k) { 28 public HeightValue(double z, double v, int k) {
17 this.z = z; 29 this.z = z;
18 this.v = v; 30 this.v = v;
19 this.k = k; 31 this.k = k;
20 } 32 }
21 33
22
23 public double getZ() { 34 public double getZ() {
24 return z; 35 return z;
25 } 36 }
26
27 37
28 public double getV() { 38 public double getV() {
29 return v; 39 return v;
30 } 40 }
31 41
32
33 public double getK() { 42 public double getK() {
34 return k; 43 return k;
35 } 44 }
36 } 45 }
46 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:

http://dive4elements.wald.intevation.org