Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightExporter.java @ 4929:1366277655b9
Bedheights: Write sounding name and set max fraction digits in calculation output.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 31 Jan 2013 11:43:28 +0100 |
parents | 2ff802d66b71 |
children |
comparison
equal
deleted
inserted
replaced
4928:57652f905a87 | 4929:1366277655b9 |
---|---|
113 NumberFormat uncertF = Formatter.getMiddleBedHeightUncert(context); | 113 NumberFormat uncertF = Formatter.getMiddleBedHeightUncert(context); |
114 NumberFormat gapF = Formatter.getMiddleBedHeightDataGap(context); | 114 NumberFormat gapF = Formatter.getMiddleBedHeightDataGap(context); |
115 NumberFormat soundF = Formatter.getMiddleBedHeightSounding(context); | 115 NumberFormat soundF = Formatter.getMiddleBedHeightSounding(context); |
116 NumberFormat widthF = Formatter.getMiddleBedHeightWidth(context); | 116 NumberFormat widthF = Formatter.getMiddleBedHeightWidth(context); |
117 | 117 |
118 heightF.setMaximumFractionDigits(1); | |
119 soundF.setMaximumFractionDigits(1); | |
118 for (MiddleBedHeightData data: mData) { | 120 for (MiddleBedHeightData data: mData) { |
119 for (int i = 0, n = data.size(); i < n; i++) { | 121 for (int i = 0, n = data.size(); i < n; i++) { |
120 int start = data.getStartYear(); | 122 int start = data.getStartYear(); |
121 int end = data.getEndYear(); | 123 int end = data.getEndYear(); |
122 | 124 |
123 if (start == end) { | 125 if (start == end) { |
124 writer.writeNext(new String[] { | 126 writer.writeNext(new String[] { |
125 kmF.format(data.getKM(i)), | 127 kmF.format(data.getKM(i)), |
126 data.getSoundingName(context), | 128 data.getDescription(), |
127 heightF.format(data.getMiddleHeight(i)), | 129 heightF.format(data.getMiddleHeight(i)), |
128 uncertF.format(data.getUncertainty(i)), | 130 uncertF.format(data.getUncertainty(i)), |
129 gapF.format(data.getDataGap(i)) + "%", | 131 gapF.format(data.getDataGap(i)) + "%", |
130 soundF.format(data.getSoundingWidth(i)), | 132 soundF.format(data.getSoundingWidth(i)), |
131 widthF.format(data.getWidth(i)), | 133 widthF.format(data.getWidth(i)), |
133 }); | 135 }); |
134 } | 136 } |
135 else { | 137 else { |
136 writer.writeNext(new String[] { | 138 writer.writeNext(new String[] { |
137 kmF.format(data.getKM(i)), | 139 kmF.format(data.getKM(i)), |
138 data.getSoundingName(context), | 140 data.getDescription(), |
139 heightF.format(data.getMiddleHeight(i)), | 141 heightF.format(data.getMiddleHeight(i)), |
140 "", | 142 "", |
141 "", | 143 "", |
142 "", | 144 "", |
143 "", | 145 "", |