[Dive4elements-commits] [PATCH 05 of 10] ImportRiver: Trigger basic (useless) da50 parsing

Wald Commits scm-commit at wald.intevation.org
Tue Jan 8 16:53:59 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1357644544 -3600
# Node ID 696285cef1825564fc102c78aff0137a7f80467e
# Parent  e77b461fa360457a7b00d549acca34e4bd0bdc73
ImportRiver: Trigger basic (useless) da50 parsing.

diff -r e77b461fa360 -r 696285cef182 flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java	Tue Jan 08 12:26:29 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java	Tue Jan 08 12:29:04 2013 +0100
@@ -23,6 +23,7 @@
 import de.intevation.flys.importer.parsers.BedHeightEpochParser;
 import de.intevation.flys.importer.parsers.BedHeightSingleParser;
 import de.intevation.flys.importer.parsers.CrossSectionParser;
+import de.intevation.flys.importer.parsers.DA50Parser;
 import de.intevation.flys.importer.parsers.DA66Parser;
 import de.intevation.flys.importer.parsers.FlowVelocityMeasurementParser;
 import de.intevation.flys.importer.parsers.FlowVelocityModelParser;
@@ -967,12 +968,25 @@
         parser.parseW80s(riverDir, w80Callback);
     }
 
+
+    /**
+     * Create and use a DA50Parser, parse the files found, add the
+     * ross-sections found.
+     */
     public void parseDA50s() {
         if (Config.INSTANCE.skipDA50s()) {
             log.info("skip parsing DA50s");
             return;
         }
-        else log.warn("DA50 parsing not yet implemented");
+        DA50Parser parser = new DA50Parser();
+        File riverDir = wstFile
+            .getParentFile()  // Basisdaten
+            .getParentFile()  // Hydrologie
+            .getParentFile(); // <river>
+
+        ImportRiverCrossSectionParserCallback da50Callback =
+            new ImportRiverCrossSectionParserCallback("da50");
+        parser.parseDA50s(riverDir, da50Callback);
     }
 
 


More information about the Dive4elements-commits mailing list