Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/math/HeightValue.java @ 465:f7038820df2e
Added support to trace rasters to JTS multi polygons and multi line strings.
Write them to shape files with GeoTools.
gnv-artifacts/trunk@526 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 11 Jan 2010 00:29:45 +0000 |
parents | 828df3ddb758 |
children | c4156275c1e1 |
rev | line source |
---|---|
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.math; |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
429
bed9735adf84
Finished preprocessing data for interpolation in verticalcrosssection charts.ß
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
427
diff
changeset
|
3 import java.io.Serializable; |
bed9735adf84
Finished preprocessing data for interpolation in verticalcrosssection charts.ß
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
427
diff
changeset
|
4 |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
5 import java.util.Comparator; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
6 |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 /** |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 * @author Ingo Weinzierl <ingo.weinzierl@intevation.de> |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
9 * @author Sascha L. Teichmann <sascha.teichmann@intevation.de> |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 */ |
429
bed9735adf84
Finished preprocessing data for interpolation in verticalcrosssection charts.ß
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
427
diff
changeset
|
11 public class HeightValue |
bed9735adf84
Finished preprocessing data for interpolation in verticalcrosssection charts.ß
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
427
diff
changeset
|
12 implements Serializable |
bed9735adf84
Finished preprocessing data for interpolation in verticalcrosssection charts.ß
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
427
diff
changeset
|
13 { |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
14 public static final Comparator INV_Z_COMPARATOR = new Comparator() { |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
15 public int compare(Object a, Object b) { |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
16 HeightValue ha = (HeightValue)a; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
17 HeightValue hb = (HeightValue)b; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
18 if (ha.z > hb.z) return -1; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
19 if (ha.z < hb.z) return +1; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
20 return 0; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
21 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
22 }; |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
24 public double z; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
25 public double v; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
26 public int k; |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 public HeightValue(double z, double v, int k) { |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 this.z = z; |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 this.v = v; |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 this.k = k; |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 } |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 public double getZ() { |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 return z; |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 } |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 public double getV() { |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 return v; |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 } |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 public double getK() { |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 return k; |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 } |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 } |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
46 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: |