comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDiffCalculation.java @ 8420:8a14605fb64a

Removed morpho width from bed height diffs.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 17 Oct 2014 12:50:35 +0200
parents 5c3b36b519d0
children 96bf5135cd0e
comparison
equal deleted inserted replaced
8419:d7d74392cc46 8420:8a14605fb64a
74 TDoubleArrayList soundings = new TDoubleArrayList(size); 74 TDoubleArrayList soundings = new TDoubleArrayList(size);
75 TDoubleArrayList absolute = new TDoubleArrayList(size); 75 TDoubleArrayList absolute = new TDoubleArrayList(size);
76 TDoubleArrayList gap = new TDoubleArrayList(size); 76 TDoubleArrayList gap = new TDoubleArrayList(size);
77 TDoubleArrayList heights1 = new TDoubleArrayList(size); 77 TDoubleArrayList heights1 = new TDoubleArrayList(size);
78 TDoubleArrayList heights2 = new TDoubleArrayList(size); 78 TDoubleArrayList heights2 = new TDoubleArrayList(size);
79 TDoubleArrayList morphs1 = new TDoubleArrayList(size); 79 //TDoubleArrayList morphs1 = new TDoubleArrayList(size);
80 TDoubleArrayList morphs2 = new TDoubleArrayList(size); 80 //TDoubleArrayList morphs2 = new TDoubleArrayList(size);
81 81
82 Integer range = null; 82 Integer range = null;
83 if (s1.getYear() != null && s2.getYear() != null) { 83 if (s1.getYear() != null && s2.getYear() != null) {
84 range = Math.abs(s1.getYear() - s2.getYear()); 84 range = Math.abs(s1.getYear() - s2.getYear());
85 } 85 }
86 86
87 for (int i = 0; i < size; i++) { 87 for (int i = 0; i < size; i++) {
88 double station = stations.getQuick(i); 88 double station = stations.getQuick(i);
89 double h1 = s1.getHeight(station); 89 double h1 = s1.getHeight(station);
90 double h2 = s2.getHeight(station); 90 double h2 = s2.getHeight(station);
91 double m1 = s1.getWidth(station); 91 //double m1 = s1.getWidth(station);
92 double m2 = s2.getWidth(station); 92 //double m2 = s2.getWidth(station);
93 double hDiff = h1 - h2; 93 double hDiff = h1 - h2;
94 94
95 if (!Double.isNaN(hDiff)) { 95 if (!Double.isNaN(hDiff)) {
96 diffRes.add(hDiff); 96 diffRes.add(hDiff);
97 kms.add(station); 97 kms.add(station);
107 if (range != null) { 107 if (range != null) {
108 absolute.add((hDiff / range) * 100d); 108 absolute.add((hDiff / range) * 100d);
109 } 109 }
110 heights1.add(h1); 110 heights1.add(h1);
111 heights2.add(h2); 111 heights2.add(h2);
112 morphs1.add(m1); 112 //morphs1.add(m1);
113 morphs2.add(m2); 113 //morphs2.add(m2);
114 } 114 }
115 } 115 }
116 return new BedDiffYearResult( 116 return new BedDiffYearResult(
117 kms, 117 kms,
118 diffRes, 118 diffRes,
119 heights1, 119 heights1,
120 heights2, 120 heights2,
121 morphs1, 121 //morphs1,
122 morphs2, 122 //morphs2,
123 soundings, 123 soundings,
124 absolute, 124 absolute,
125 gap, 125 gap,
126 s1.getYear(), 126 s1.getYear(),
127 s2.getYear(), 127 s2.getYear(),

http://dive4elements.wald.intevation.org