[Dive4elements-commits] [PATCH 6 of 7] ImportRiver: Trigger w80csv-parsing
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 24 14:41:49 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1366798023 -7200
# Node ID dba9e1fa233e7153ea7a57ed689e370b8ce418fe
# Parent 53fcc0d5a03ecb287779ec73f9c9da40cd1a32f9
ImportRiver: Trigger w80csv-parsing.
diff -r 53fcc0d5a03e -r dba9e1fa233e flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java Wed Apr 24 12:04:25 2013 +0200
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java Wed Apr 24 12:07:03 2013 +0200
@@ -22,6 +22,7 @@
import de.intevation.flys.importer.parsers.SedimentDensityParser;
import de.intevation.flys.importer.parsers.SedimentYieldParser;
import de.intevation.flys.importer.parsers.W80Parser;
+import de.intevation.flys.importer.parsers.W80CSVParser;
import de.intevation.flys.importer.parsers.WaterlevelDifferencesParser;
import de.intevation.flys.importer.parsers.WaterlevelParser;
import de.intevation.flys.importer.parsers.WstParser;
@@ -288,6 +289,7 @@
parseDA66s();
parseDA50s();
parseW80s();
+ parseW80CSVs();
parseHYKs();
parseWst();
parseExtraWsts();
@@ -1005,6 +1007,29 @@
parser.parseW80s(riverDir, w80Callback);
}
+ /** Create a W80 Parser and parse w80 files found. */
+ public void parseW80CSVs() {
+ if (Config.INSTANCE.skipW80CSVs()) {
+ log.info("skip parsing W80 csvs");
+ return;
+ }
+ W80CSVParser parser = new W80CSVParser();
+ File riverDir = wstFile
+ .getParentFile() // Basisdaten
+ .getParentFile() // Hydrologie
+ .getParentFile(); // <river>
+
+ // Construct the Cross-Section-Data path.
+ File csDir = new File(riverDir.getPath()
+ + File.separator + "Geodaesie"
+ + File.separator + "Querprofile"
+ + File.separator + "QP-Daten");
+
+ ImportRiverCrossSectionParserCallback w80CSVCallback =
+ new ImportRiverCrossSectionParserCallback("w80-csv");
+ parser.parseW80CSVs(csDir, w80CSVCallback);
+ }
+
/**
* Create and use a DA50Parser, parse the files found, add the
@@ -1118,7 +1143,11 @@
}
public void storeCrossSections() {
- if (!Config.INSTANCE.skipPRFs() || !Config.INSTANCE.skipDA66s() || !Config.INSTANCE.skipDA50s() || !Config.INSTANCE.skipW80s()) {
+ if (!Config.INSTANCE.skipPRFs()
+ || !Config.INSTANCE.skipDA66s()
+ || !Config.INSTANCE.skipDA50s()
+ || !Config.INSTANCE.skipW80s()
+ || !Config.INSTANCE.skipW80CSVs()) {
log.info("store cross sections");
getPeer();
for (ImportCrossSection crossSection: crossSections) {
More information about the Dive4elements-commits
mailing list