comparison backend/src/main/java/org/dive4elements/river/importer/ImportRiver.java @ 7193:7fabae60428b double-precision

Merged changes from default into double-precision branch.
author Tom Gottfried <tom@intevation.de>
date Fri, 27 Sep 2013 17:36:50 +0200
parents 827da1952ce2 0fe00824bd96
children 2ce7bacc940f
comparison
equal deleted inserted replaced
7016:28748bb1b676 7193:7fabae60428b
939 } 939 }
940 940
941 WstParser wstParser = new WstParser(); 941 WstParser wstParser = new WstParser();
942 wstParser.parse(wstFile); 942 wstParser.parse(wstFile);
943 wst = wstParser.getWst(); 943 wst = wstParser.getWst();
944 wst.setKmUp(wst.guessWaterLevelIncreasing());
944 } 945 }
945 946
946 public void parseGauges() throws IOException { 947 public void parseGauges() throws IOException {
947 if (Config.INSTANCE.skipGauges()) { 948 if (Config.INSTANCE.skipGauges()) {
948 log.info("skip parsing gauges"); 949 log.info("skip parsing gauges");
1220 } 1221 }
1221 } 1222 }
1222 } 1223 }
1223 1224
1224 public void storeWst() { 1225 public void storeWst() {
1225 if (!Config.INSTANCE.skipWst()) { 1226 if (wst != null && !Config.INSTANCE.skipWst()) {
1226 River river = getPeer(); 1227 River river = getPeer();
1227 wst.storeDependencies(river); 1228 wst.storeDependencies(river);
1229
1230 // The flow direction of the main wst and the corresponding
1231 // waterlevels determine if the river is 'km_up'.
1232 Session session = ImporterSession.getInstance().getDatabaseSession();
1233 river.setKmUp(wst.getKmUp());
1234 session.save(river);
1228 } 1235 }
1229 } 1236 }
1230 1237
1231 public void storeFixations() { 1238 public void storeFixations() {
1232 if (!Config.INSTANCE.skipFixations()) { 1239 if (!Config.INSTANCE.skipFixations()) {

http://dive4elements.wald.intevation.org