Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java @ 6809:4ff177f48952 double-precision
WstParser and Importer doc: More sensible default unit and warn if it is used.
author | Tom Gottfried <tom.gottfried@intevation.de> |
---|---|
date | Fri, 09 Aug 2013 20:30:14 +0200 |
parents | c14e17dabf39 |
children | 1d60614c1059 |
comparison
equal
deleted
inserted
replaced
6808:5487d1215f34 | 6809:4ff177f48952 |
---|---|
139 BigDecimal kmHist1 = null; | 139 BigDecimal kmHist1 = null; |
140 BigDecimal kmHist2 = null; | 140 BigDecimal kmHist2 = null; |
141 | 141 |
142 boolean columnHeaderChecked = false; | 142 boolean columnHeaderChecked = false; |
143 | 143 |
144 String einheit = "Wasserstand [NN + m]"; | 144 /* Default string for altitude reference |
145 * if none is found in WST-file*/ | |
146 String einheit = "m ΓΌ. unbekannte Referenz"; | |
145 | 147 |
146 HashSet<BigDecimal> kms = new HashSet<BigDecimal>(); | 148 HashSet<BigDecimal> kms = new HashSet<BigDecimal>(); |
147 | 149 |
148 while ((input = in.readLine()) != null) { | 150 while ((input = in.readLine()) != null) { |
149 String line = input; | 151 String line = input; |
259 String [] units = m.group(1).split("\\s{2,}"); | 261 String [] units = m.group(1).split("\\s{2,}"); |
260 m = UNIT.matcher(units[0]); | 262 m = UNIT.matcher(units[0]); |
261 einheit = m.matches() ? m.group(1) : units[0]; | 263 einheit = m.matches() ? m.group(1) : units[0]; |
262 log.debug("unit: " + einheit); | 264 log.debug("unit: " + einheit); |
263 } | 265 } |
266 else { | |
267 log.warn("no unit and height reference found. Using default."); | |
268 } | |
264 continue; | 269 continue; |
265 } | 270 } |
266 | 271 |
267 if (firstAbfluesse != null) { | 272 if (firstAbfluesse != null) { |
268 if (!columnHeaderChecked) { | 273 if (!columnHeaderChecked) { |