[PATCH] (issue1754) Fix check for empty data bounds
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 29 14:14:18 CEST 2015
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1430309637 -7200
# Node ID 68827654ea7a3c0712d22cc8c0e092dab58427a1
# Parent 47199406994a51922034e01aa83b1a3fe20a8231
(issue1754) Fix check for empty data bounds
diff -r 47199406994a -r 68827654ea7a artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java Wed Apr 29 12:30:57 2015 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java Wed Apr 29 14:13:57 2015 +0200
@@ -97,11 +97,13 @@
if (dataBounds == null) {
// Diagram is empty.
candidate = new Range(0d, 0d);
+ log.debug("Empty diagram using fake Range");
+ } else {
+ // Diagram is not zoomed
+ candidate = new Range(dataBounds.getLower().doubleValue(),
+ dataBounds.getUpper().doubleValue());
+ log.debug("Using Full X Range.");
}
- // Diagram is not zoomed
- candidate = new Range(dataBounds.getLower().doubleValue(),
- dataBounds.getUpper().doubleValue());
- log.debug("Using Full X Range.");
}
log.debug("startkm for Radius is: " + candidate.getLowerBound() +
" endkm: " + candidate.getUpperBound());
More information about the Dive4Elements-commits
mailing list