Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java @ 8433:706668b19b04
Antiprogramming (in german: 'Softwareabwicklung')
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 17 Oct 2014 19:21:45 +0200 |
parents | 96bf5135cd0e |
children | 76113b975829 |
comparison
equal
deleted
inserted
replaced
8432:e54641c44d6d | 8433:706668b19b04 |
---|---|
76 TDoubleArrayList absolute = new TDoubleArrayList(size); | 76 TDoubleArrayList absolute = new TDoubleArrayList(size); |
77 TDoubleArrayList gap1 = new TDoubleArrayList(size); | 77 TDoubleArrayList gap1 = new TDoubleArrayList(size); |
78 TDoubleArrayList gap2 = new TDoubleArrayList(size); | 78 TDoubleArrayList gap2 = new TDoubleArrayList(size); |
79 TDoubleArrayList heights1 = new TDoubleArrayList(size); | 79 TDoubleArrayList heights1 = new TDoubleArrayList(size); |
80 TDoubleArrayList heights2 = new TDoubleArrayList(size); | 80 TDoubleArrayList heights2 = new TDoubleArrayList(size); |
81 //TDoubleArrayList morphs1 = new TDoubleArrayList(size); | |
82 //TDoubleArrayList morphs2 = new TDoubleArrayList(size); | |
83 | 81 |
84 Integer range = null; | 82 Integer range = null; |
85 if (s1.getYear() != null && s2.getYear() != null) { | 83 if (s1.getYear() != null && s2.getYear() != null) { |
86 range = Math.abs(s1.getYear() - s2.getYear()); | 84 range = Math.abs(s1.getYear() - s2.getYear()); |
87 } | 85 } |
88 | 86 |
89 for (int i = 0; i < size; i++) { | 87 for (int i = 0; i < size; i++) { |
90 double station = stations.getQuick(i); | 88 double station = stations.getQuick(i); |
91 double h1 = s1.getHeight(station); | 89 double h1 = s1.getHeight(station); |
92 double h2 = s2.getHeight(station); | 90 double h2 = s2.getHeight(station); |
93 //double m1 = s1.getWidth(station); | |
94 //double m2 = s2.getWidth(station); | |
95 double hDiff = h1 - h2; | 91 double hDiff = h1 - h2; |
96 | 92 |
97 if (!Double.isNaN(hDiff)) { | 93 if (!Double.isNaN(hDiff)) { |
98 diffRes.add(hDiff); | 94 diffRes.add(hDiff); |
99 kms.add(station); | 95 kms.add(station); |
107 if (range != null) { | 103 if (range != null) { |
108 absolute.add((hDiff / range) * 100d); | 104 absolute.add((hDiff / range) * 100d); |
109 } | 105 } |
110 heights1.add(h1); | 106 heights1.add(h1); |
111 heights2.add(h2); | 107 heights2.add(h2); |
112 //morphs1.add(m1); | |
113 //morphs2.add(m2); | |
114 } | 108 } |
115 } | 109 } |
116 return new BedDiffYearResult( | 110 return new BedDiffYearResult( |
117 kms, | 111 kms, |
118 diffRes, | 112 diffRes, |
119 heights1, | 113 heights1, |
120 heights2, | 114 heights2, |
121 //morphs1, | |
122 //morphs2, | |
123 soundings1, | 115 soundings1, |
124 soundings2, | 116 soundings2, |
125 absolute, | 117 absolute, |
126 gap1, | 118 gap1, |
127 gap2, | 119 gap2, |