comparison backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java @ 6273:e7526a074c0d double-precision

Bed height parser: check for duplicate stations
author Tom Gottfried <tom.gottfried@intevation.de>
date Tue, 11 Jun 2013 13:03:50 +0200
parents a3fb76cf79b6
children f095b58c95d9
comparison
equal deleted inserted replaced
6264:e8f152163a1e 6273:e7526a074c0d
48 48
49 Double km; 49 Double km;
50 50
51 try { 51 try {
52 km = new Double(nf.parse(values[0]).doubleValue()); 52 km = new Double(nf.parse(values[0]).doubleValue());
53 } 53
54 Double key = Double.valueOf(km);
55
56 if (kmExists.contains(key)) {
57 log.warn("duplicate station '" + km + "': -> ignored");
58 return;
59 }
60
61 kmExists.add(key);
62 }
63
54 catch (ParseException e) { 64 catch (ParseException e) {
55 // We expect a lot of ";;;;;;" lines. 65 // We expect a lot of ";;;;;;" lines.
56 //log.warn("BSP: Error while parsing km of data row.", e); 66 //log.warn("BSP: Error while parsing km of data row.", e);
57 return; 67 return;
58 } 68 }

http://dive4elements.wald.intevation.org