comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/AbstractSInfoCalculationResult.java @ 8940:82998242ba84

Preparing for additional outputs of SINFO-Tkh
author gernotbelger
date Tue, 06 Mar 2018 18:51:18 +0100
parents d9dbf0b74bc2
children 5d5d482da3e9
comparison
equal deleted inserted replaced
8939:2970368ae1e3 8940:82998242ba84
60 60
61 public final Collection<ROW> getRows() { 61 public final Collection<ROW> getRows() {
62 return Collections.unmodifiableCollection(this.rows); 62 return Collections.unmodifiableCollection(this.rows);
63 } 63 }
64 64
65 public double[][] getFlowDepthPoints() {
66
67 final TDoubleArrayList xPoints = new TDoubleArrayList(this.rows.size());
68 final TDoubleArrayList yPoints = new TDoubleArrayList(this.rows.size());
69
70 for (final ROW row : this.rows) {
71 xPoints.add(row.getStation());
72 yPoints.add(row.getFlowDepth());
73 }
74
75 return new double[][] { xPoints.toNativeArray(), yPoints.toNativeArray() };
76 }
77
78 public double[][] getFlowDepthTkhPoints() {
79
80 final TDoubleArrayList xPoints = new TDoubleArrayList(this.rows.size());
81 final TDoubleArrayList yPoints = new TDoubleArrayList(this.rows.size());
82
83 for (final ROW row : this.rows) {
84 xPoints.add(row.getStation());
85 yPoints.add(row.getFlowDepthWithTkh());
86 }
87
88 return new double[][] { xPoints.toNativeArray(), yPoints.toNativeArray() };
89 }
90
65 public final double[][] getTkhUpPoints() { 91 public final double[][] getTkhUpPoints() {
66 final TDoubleArrayList xPoints = new TDoubleArrayList(this.rows.size()); 92 final TDoubleArrayList xPoints = new TDoubleArrayList(this.rows.size());
67 final TDoubleArrayList yPoints = new TDoubleArrayList(this.rows.size()); 93 final TDoubleArrayList yPoints = new TDoubleArrayList(this.rows.size());
68 final List<SoilKind> kinds = new ArrayList<>(this.rows.size()); 94 final List<SoilKind> kinds = new ArrayList<>(this.rows.size());
69 95
86 yPoints.add(row.getTkhDown()); 112 yPoints.add(row.getTkhDown());
87 kinds.add(row.getTkhKind()); 113 kinds.add(row.getTkhKind());
88 } 114 }
89 115
90 return adjustTkhVisualization(xPoints, yPoints, kinds); 116 return adjustTkhVisualization(xPoints, yPoints, kinds);
117 }
118
119 public double[][] getVelocityPoints() {
120
121 final TDoubleArrayList xPoints = new TDoubleArrayList(this.rows.size());
122 final TDoubleArrayList yPoints = new TDoubleArrayList(this.rows.size());
123
124 for (final ROW row : this.rows) {
125 xPoints.add(row.getStation());
126 yPoints.add(row.getVelocity());
127 }
128
129 return new double[][] { xPoints.toNativeArray(), yPoints.toNativeArray() };
130 }
131
132 public double[][] getD50Points() {
133
134 final TDoubleArrayList xPoints = new TDoubleArrayList(this.rows.size());
135 final TDoubleArrayList yPoints = new TDoubleArrayList(this.rows.size());
136
137 for (final ROW row : this.rows) {
138 xPoints.add(row.getStation());
139 yPoints.add(row.getD50());
140 }
141
142 return new double[][] { xPoints.toNativeArray(), yPoints.toNativeArray() };
143 }
144
145 public double[][] getTauPoints() {
146
147 final TDoubleArrayList xPoints = new TDoubleArrayList(this.rows.size());
148 final TDoubleArrayList yPoints = new TDoubleArrayList(this.rows.size());
149
150 for (final ROW row : this.rows) {
151 xPoints.add(row.getStation());
152 yPoints.add(row.getTau());
153 }
154
155 return new double[][] { xPoints.toNativeArray(), yPoints.toNativeArray() };
91 } 156 }
92 157
93 /** 158 /**
94 * the up and down points must be further adjusted for visualization, see Mail Hr. Reiß 159 * the up and down points must be further adjusted for visualization, see Mail Hr. Reiß
95 * basically we need to introduce extra points when the kind changes, so we get vertical lines in that case 160 * basically we need to introduce extra points when the kind changes, so we get vertical lines in that case

http://dive4elements.wald.intevation.org