Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java @ 8554:3a0522f1a532
Morphological width imported and stored with heights is redundant to table morphologic_width.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Mon, 16 Feb 2015 09:00:08 +0100 |
parents | df5838cc7ecc |
children | 6fcf4717605f |
comparison
equal
deleted
inserted
replaced
8553:17c476e90c07 | 8554:3a0522f1a532 |
---|---|
55 "export.bedheight_middle.csv.header.datagap"; | 55 "export.bedheight_middle.csv.header.datagap"; |
56 | 56 |
57 public static final String CSV_SOUNDING_WIDTH = | 57 public static final String CSV_SOUNDING_WIDTH = |
58 "export.bedheight_middle.csv.header.soundingwidth"; | 58 "export.bedheight_middle.csv.header.soundingwidth"; |
59 | 59 |
60 public static final String CSV_WIDTH = | |
61 "export.bedheight_middle.csv.header.width"; | |
62 | |
63 public static final String CSV_LOCATIONS = | 60 public static final String CSV_LOCATIONS = |
64 "export.bedheight_middle.csv.header.locations"; | 61 "export.bedheight_middle.csv.header.locations"; |
65 | 62 |
66 public static final String CSV_META_YEAR = | 63 public static final String CSV_META_YEAR = |
67 "meta.bedheight.year"; | 64 "meta.bedheight.year"; |
129 | 126 |
130 protected void writeCSVHeader(CSVWriter writer) { | 127 protected void writeCSVHeader(CSVWriter writer) { |
131 River river = RiverUtils.getRiver((D4EArtifact) master); | 128 River river = RiverUtils.getRiver((D4EArtifact) master); |
132 String riverUnit = river.getWstUnit().getName(); | 129 String riverUnit = river.getWstUnit().getName(); |
133 writer.writeNext(new String[] { | 130 writer.writeNext(new String[] { |
134 msg(CSV_KM, CSV_KM), | 131 msg(CSV_KM), |
135 msg(CSV_SOUNDING, CSV_SOUNDING), | 132 msg(CSV_SOUNDING), |
136 msg(CSV_HEIGHT, CSV_HEIGHT, new Object[] {riverUnit}), | 133 msg(CSV_HEIGHT, new Object[] {riverUnit}), |
137 msg(CSV_UNCERTAINTY, CSV_UNCERTAINTY), | 134 msg(CSV_UNCERTAINTY), |
138 msg(CSV_DATA_GAP, CSV_DATA_GAP), | 135 msg(CSV_DATA_GAP), |
139 msg(CSV_SOUNDING_WIDTH, CSV_SOUNDING_WIDTH), | 136 msg(CSV_SOUNDING_WIDTH), |
140 msg(CSV_WIDTH, CSV_WIDTH), | 137 msg(CSV_LOCATIONS) |
141 msg(CSV_LOCATIONS, CSV_LOCATIONS) | |
142 }); | 138 }); |
143 } | 139 } |
144 | 140 |
145 | 141 |
146 protected void data2CSV(CSVWriter writer, MiddleBedHeightData data) { | 142 protected void data2CSV(CSVWriter writer, MiddleBedHeightData data) { |
153 NumberFormat kmF = Formatter.getMiddleBedHeightKM(context); | 149 NumberFormat kmF = Formatter.getMiddleBedHeightKM(context); |
154 NumberFormat heightF = Formatter.getMiddleBedHeightHeight(context); | 150 NumberFormat heightF = Formatter.getMiddleBedHeightHeight(context); |
155 NumberFormat uncertF = Formatter.getMiddleBedHeightUncert(context); | 151 NumberFormat uncertF = Formatter.getMiddleBedHeightUncert(context); |
156 NumberFormat gapF = Formatter.getMiddleBedHeightDataGap(context); | 152 NumberFormat gapF = Formatter.getMiddleBedHeightDataGap(context); |
157 NumberFormat soundF = Formatter.getMiddleBedHeightSounding(context); | 153 NumberFormat soundF = Formatter.getMiddleBedHeightSounding(context); |
158 NumberFormat widthF = Formatter.getMiddleBedHeightWidth(context); | |
159 | 154 |
160 heightF.setMaximumFractionDigits(1); | 155 heightF.setMaximumFractionDigits(1); |
161 soundF.setMaximumFractionDigits(1); | 156 soundF.setMaximumFractionDigits(1); |
162 | 157 |
163 SortedMap <Double, Integer> kmIndexMap = new TreeMap<Double, Integer>(); | 158 SortedMap <Double, Integer> kmIndexMap = new TreeMap<Double, Integer>(); |
178 data.getDescription(), | 173 data.getDescription(), |
179 heightF.format(data.getMiddleHeight(i)), | 174 heightF.format(data.getMiddleHeight(i)), |
180 uncert, | 175 uncert, |
181 gap, | 176 gap, |
182 sound, | 177 sound, |
183 widthF.format(data.getWidth(i)), | |
184 RiverUtils.getLocationDescription(flys, data.getKM(i)), | 178 RiverUtils.getLocationDescription(flys, data.getKM(i)), |
185 }); | 179 }); |
186 } | 180 } |
187 } | 181 } |
188 | 182 |
210 }); | 204 }); |
211 } | 205 } |
212 | 206 |
213 @Override | 207 @Override |
214 protected void writePDF(OutputStream out) { | 208 protected void writePDF(OutputStream out) { |
215 log.error("TODO: Implement FlowVelocityExporter.writePDF"); | 209 log.error("TODO: Implement MiddleBedHeightExporter.writePDF"); |
216 } | 210 } |
217 } | 211 } |
218 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : | 212 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |