[PATCH] Make SQ-relations loadable in WQ-diagrams
Wald Commits
scm-commit at wald.intevation.org
Tue Sep 23 16:45:51 CEST 2014
# HG changeset patch
# User "Tom Gottfried <tom at intevation.de>"
# Date 1411483547 -7200
# Node ID e3a8aa6eee3256a54b6f212d1306a2d5d68baab8
# Parent 4acf7cff7355f58cb6f0264cc545709d59910f20
Make SQ-relations loadable in WQ-diagrams.
diff -r 4acf7cff7355 -r e3a8aa6eee32 artifacts/doc/conf/generators/discharge-diagram-defaults.xml
--- a/artifacts/doc/conf/generators/discharge-diagram-defaults.xml Tue Sep 23 15:07:39 2014 +0200
+++ b/artifacts/doc/conf/generators/discharge-diagram-defaults.xml Tue Sep 23 16:45:47 2014 +0200
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<discharge-defaults>
<axis name="W"/>
+ <axis name="Transport" logarithmic="true"/>
<domain-axis key="chart.discharge.xaxis.label" default="Q [kubikmeter]"/>
<processor class="org.dive4elements.river.exports.process.DischargeProcessor" axis="W"/>
<processor class="org.dive4elements.river.exports.process.MiscDischargeProcessor" axis="W"/>
@@ -8,4 +9,5 @@
<processor class="org.dive4elements.river.exports.process.HistoricalDischargeProcessor" axis="W"/>
<processor class="org.dive4elements.river.exports.process.FixWQProcessor" axis="W"/>
<processor class="org.dive4elements.river.exports.process.FixDerivedProcessor" axis="W"/>
+ <processor class="org.dive4elements.river.exports.process.SQRelationProcessor" axis="Transport"/>
</discharge-defaults>
diff -r 4acf7cff7355 -r e3a8aa6eee32 artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java Tue Sep 23 15:07:39 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/RangeAccess.java Tue Sep 23 16:45:47 2014 +0200
@@ -133,7 +133,7 @@
}
if (from == null) {
- log.warn("No 'from' found. assume max of river.");
+ log.warn("No 'from' found. Assume min of river.");
return getRiver().determineMinMaxDistance()[0];
}
@@ -152,7 +152,7 @@
}
if (to == null) {
- log.warn("No 'to' found. assume max of river.");
+ log.warn("No 'to' found. Assume max of river.");
return getRiver().determineMinMaxDistance()[1];
}
diff -r 4acf7cff7355 -r e3a8aa6eee32 artifacts/src/main/java/org/dive4elements/river/exports/injector/ComputedDischargeInjector.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/injector/ComputedDischargeInjector.java Tue Sep 23 15:07:39 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/injector/ComputedDischargeInjector.java Tue Sep 23 16:45:47 2014 +0200
@@ -28,7 +28,9 @@
Document doc
) {
RangeAccess access = new RangeAccess((D4EArtifact)artifact);
- double km = access.getFrom();
- ctx.putContextValue(CURRENT_KM, km);
+ if (access.hasFrom()) {
+ double km = access.getFrom();
+ ctx.putContextValue(CURRENT_KM, km);
+ }
}
}
More information about the Dive4Elements-commits
mailing list