Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/math/XYColumn.java @ 605:e8ebdbc7f1e3
First step of removing the cache blob. The static part of the describe document will be created by using the input data stored at each state. Some TODOs left (see ChangeLog).
gnv-artifacts/trunk@671 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 09 Feb 2010 14:27:55 +0000 |
parents | bc5901bb4525 |
children | b1f5f2a8840f |
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 |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.util.ArrayList; |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.util.List; |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
5 import java.util.Collections; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
6 |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
7 import org.apache.commons.math.analysis.interpolation.SplineInterpolator; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
8 import org.apache.commons.math.analysis.interpolation.UnivariateRealInterpolator; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
9 |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
10 import org.apache.commons.math.analysis.UnivariateRealFunction; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
11 |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
12 import org.apache.commons.math.MathException; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
13 import org.apache.commons.math.FunctionEvaluationException; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
14 |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
15 import org.apache.log4j.Logger; |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 /** |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 * @author Ingo Weinzierl <ingo.weinzierl@intevation.de> |
431
422275fc9927
Refactored the XYColumn and Point2d code a bit to be more reusable in 3D.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
19 * @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
|
20 */ |
429
bed9735adf84
Finished preprocessing data for interpolation in verticalcrosssection charts.ß
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
427
diff
changeset
|
21 public class XYColumn |
431
422275fc9927
Refactored the XYColumn and Point2d code a bit to be more reusable in 3D.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
22 extends Point2d |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
23 implements UnivariateRealFunction |
429
bed9735adf84
Finished preprocessing data for interpolation in verticalcrosssection charts.ß
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
427
diff
changeset
|
24 { |
434
0eed5749fd63
Implemented the raster interpolation for the 'Profilschnitt'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
433
diff
changeset
|
25 private static Logger log = Logger.getLogger(XYColumn.class); |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
26 |
432
6a70e8883307
Added some type safety. Fixed z value bug in reading database preprocessing. Only dissemble WKT points if really needed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
431
diff
changeset
|
27 protected List<HeightValue> values; |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
29 protected transient UnivariateRealFunction curve; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
30 |
431
422275fc9927
Refactored the XYColumn and Point2d code a bit to be more reusable in 3D.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
31 public XYColumn() { |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
32 values = new ArrayList<HeightValue>(); |
431
422275fc9927
Refactored the XYColumn and Point2d code a bit to be more reusable in 3D.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
33 } |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 public XYColumn(double x, double y, int i, int j) { |
431
422275fc9927
Refactored the XYColumn and Point2d code a bit to be more reusable in 3D.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
36 super(x, y, i, j); |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
37 values = new ArrayList<HeightValue>(); |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 } |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 public void add(HeightValue value) { |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 values.add(value); |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 } |
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 |
432
6a70e8883307
Added some type safety. Fixed z value bug in reading database preprocessing. Only dissemble WKT points if really needed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
431
diff
changeset
|
44 public List<HeightValue> getValues() { |
6a70e8883307
Added some type safety. Fixed z value bug in reading database preprocessing. Only dissemble WKT points if really needed.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
431
diff
changeset
|
45 return values; |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 } |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
47 |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
48 public double value(double depth) { |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
49 try { |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
50 if (curve != null) { |
434
0eed5749fd63
Implemented the raster interpolation for the 'Profilschnitt'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
433
diff
changeset
|
51 HeightValue h = values.get(0); |
0eed5749fd63
Implemented the raster interpolation for the 'Profilschnitt'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
433
diff
changeset
|
52 // extrapolate beyond boundaries by repeating |
0eed5749fd63
Implemented the raster interpolation for the 'Profilschnitt'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
433
diff
changeset
|
53 if (depth > h.z) return h.v; |
0eed5749fd63
Implemented the raster interpolation for the 'Profilschnitt'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
433
diff
changeset
|
54 h = values.get(values.size()-1); |
0eed5749fd63
Implemented the raster interpolation for the 'Profilschnitt'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
433
diff
changeset
|
55 if (depth < h.z) return h.v; |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
56 return curve.value(depth); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
57 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
58 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
59 catch (FunctionEvaluationException fee) { |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
60 log.error("evaluation failed", fee); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
61 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
62 |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
63 return Double.NaN; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
64 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
65 |
434
0eed5749fd63
Implemented the raster interpolation for the 'Profilschnitt'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
433
diff
changeset
|
66 public boolean prepare(XYDepth xyDepth) { |
445
f42ed4f10b79
Fixed some bugs and create "Profilschnitt" polygons via configuration.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
440
diff
changeset
|
67 if (curve == null) { |
451
bc5901bb4525
Use JFreeCharts ValueAxis.valueToJava2D() to transform data values
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
448
diff
changeset
|
68 int N = values.size(); |
445
f42ed4f10b79
Fixed some bugs and create "Profilschnitt" polygons via configuration.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
440
diff
changeset
|
69 if (N == 0) { |
f42ed4f10b79
Fixed some bugs and create "Profilschnitt" polygons via configuration.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
440
diff
changeset
|
70 log.error("no points for interpolation"); |
f42ed4f10b79
Fixed some bugs and create "Profilschnitt" polygons via configuration.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
440
diff
changeset
|
71 return false; |
f42ed4f10b79
Fixed some bugs and create "Profilschnitt" polygons via configuration.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
440
diff
changeset
|
72 } |
f42ed4f10b79
Fixed some bugs and create "Profilschnitt" polygons via configuration.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
440
diff
changeset
|
73 |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
74 if (N == 1) { |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
75 // only one value -> constant function |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
76 curve = new ConstantFunction(values.get(0).v); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
77 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
78 else { // more than on value |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
79 double depth = xyDepth.depth(this); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
80 Collections.sort(values, HeightValue.INV_Z_COMPARATOR); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
81 |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
82 // if there is no value at 0 repeat first value |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
83 HeightValue first = values.get(0); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
84 if (first.z < 0d) { |
448
3cb2bea50456
Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
445
diff
changeset
|
85 values.add(0, new HeightValue(0d, first.v, first.k-1)); |
445
f42ed4f10b79
Fixed some bugs and create "Profilschnitt" polygons via configuration.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
440
diff
changeset
|
86 ++N; |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
87 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
88 |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
89 // if there is no value at depth repeat last value |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
90 HeightValue last = values.get(N-1); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
91 if (last.z > depth) { |
448
3cb2bea50456
Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
445
diff
changeset
|
92 values.add(new HeightValue(depth, last.v, last.k+1)); |
445
f42ed4f10b79
Fixed some bugs and create "Profilschnitt" polygons via configuration.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
440
diff
changeset
|
93 ++N; |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
94 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
95 if (N < 3) { // interpolate linear |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
96 first = values.get(0); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
97 last = values.get(N-1); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
98 curve = new LinearFunction.Univariate( |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
99 first.z, first.v, |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
100 last.z, last.v); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
101 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
102 else { // higher degree interpolation |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
103 double [] z = new double[N]; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
104 double [] v = new double[N]; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
105 for (int i = 0; i < N; ++i) { |
445
f42ed4f10b79
Fixed some bugs and create "Profilschnitt" polygons via configuration.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
440
diff
changeset
|
106 HeightValue h = values.get(N-1-i); |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
107 z[i] = h.z; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
108 v[i] = h.v; |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
109 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
110 try { |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
111 curve = getInterpolator().interpolate(z, v); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
112 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
113 catch (MathException me) { |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
114 log.error("interpolation failed", me); |
434
0eed5749fd63
Implemented the raster interpolation for the 'Profilschnitt'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
433
diff
changeset
|
115 return false; |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
116 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
117 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
118 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
119 } |
434
0eed5749fd63
Implemented the raster interpolation for the 'Profilschnitt'.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
433
diff
changeset
|
120 return true; |
433
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
121 } |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
122 |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
123 protected UnivariateRealInterpolator getInterpolator() { |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
124 return new SplineInterpolator(); |
828df3ddb758
Added interpolation capabilities along z axis to XYColumns.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
432
diff
changeset
|
125 } |
427
a95aaeb206f7
Added data model classes to store information for interpolation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 } |
431
422275fc9927
Refactored the XYColumn and Point2d code a bit to be more reusable in 3D.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
429
diff
changeset
|
127 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: |