Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/parsers/PRFParser.java @ 6407:3158f8f227bf
issue1313: Use correct skip lines. In case of recognizing skip, the
first one is skipped already.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 24 Jun 2013 11:06:08 +0200 |
parents | e514cab94026 |
children | f3078357ec65 |
comparison
equal
deleted
inserted
replaced
6406:24b4819ef514 | 6407:3158f8f227bf |
---|---|
362 | 362 |
363 Double station = Double.valueOf(km); | 363 Double station = Double.valueOf(km); |
364 | 364 |
365 List<XY> kmData = data.get(station); | 365 List<XY> kmData = data.get(station); |
366 | 366 |
367 // When the station changed we know we are expecting skip/dummy lines. | 367 // When the station changed (no data yet in line) we expect |
368 // skip/dummy lines to follow | |
368 if (kmData == null) { | 369 if (kmData == null) { |
369 //log.debug("found new km: " + station); | |
370 kmData = new ArrayList<XY>(); | 370 kmData = new ArrayList<XY>(); |
371 data.put(station, kmData); | 371 data.put(station, kmData); |
372 // When a station change occurs, dummy lines will occur, too. | 372 // When a station change occurs, dummy lines will occur, too. |
373 skip = lineSkipCount; | 373 skip = lineSkipCount -1; |
374 continue; | 374 continue; |
375 } | 375 } |
376 | 376 |
377 dataFormat.extractData(line, kmData); | 377 dataFormat.extractData(line, kmData); |
378 } | 378 } |