Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/LongitudinalSectionGenerator2.java @ 8725:68827654ea7a
(issue1754) Fix check for empty data bounds
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 29 Apr 2015 14:13:57 +0200 |
parents | 686d8876edf9 |
children | cb33de3434a8 |
comparison
equal
deleted
inserted
replaced
8724:47199406994a | 8725:68827654ea7a |
---|---|
95 | 95 |
96 if (candidate == null) { | 96 if (candidate == null) { |
97 if (dataBounds == null) { | 97 if (dataBounds == null) { |
98 // Diagram is empty. | 98 // Diagram is empty. |
99 candidate = new Range(0d, 0d); | 99 candidate = new Range(0d, 0d); |
100 log.debug("Empty diagram using fake Range"); | |
101 } else { | |
102 // Diagram is not zoomed | |
103 candidate = new Range(dataBounds.getLower().doubleValue(), | |
104 dataBounds.getUpper().doubleValue()); | |
105 log.debug("Using Full X Range."); | |
100 } | 106 } |
101 // Diagram is not zoomed | |
102 candidate = new Range(dataBounds.getLower().doubleValue(), | |
103 dataBounds.getUpper().doubleValue()); | |
104 log.debug("Using Full X Range."); | |
105 } | 107 } |
106 log.debug("startkm for Radius is: " + candidate.getLowerBound() + | 108 log.debug("startkm for Radius is: " + candidate.getLowerBound() + |
107 " endkm: " + candidate.getUpperBound()); | 109 " endkm: " + candidate.getUpperBound()); |
108 context.putContextValue("startkm", candidate.getLowerBound()); | 110 context.putContextValue("startkm", candidate.getLowerBound()); |
109 context.putContextValue("endkm", candidate.getUpperBound()); | 111 context.putContextValue("endkm", candidate.getUpperBound()); |