comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/RiverInfoProvider.java @ 9158:4a41b7fba4da

Added a getter for any gauge belonging to the km range
author mschaefer
date Tue, 19 Jun 2018 14:20:52 +0200
parents aab0c2730a25
children 0dcd1cd41915
comparison
equal deleted inserted replaced
9157:f9bb5d0a6ff3 9158:4a41b7fba4da
95 95
96 private Gauge getGauge(final double km) { 96 private Gauge getGauge(final double km) {
97 97
98 // REMARK: using same logic as in WaterlevelExporter here 98 // REMARK: using same logic as in WaterlevelExporter here
99 99
100 if (this.showAllGauges) 100 return getGauge(km, this.showAllGauges);
101 }
102
103 public Gauge getGauge(final double km, final boolean allGauges) {
104 if (allGauges)
101 return this.gaugeIndex.findGauge(km); 105 return this.gaugeIndex.findGauge(km);
102 106
103 if ((this.refGauge != null) && this.refGauge.getRange().contains(km)) 107 if ((this.refGauge != null) && this.refGauge.getRange().contains(km))
104 return this.refGauge; 108 return this.refGauge;
105 109

http://dive4elements.wald.intevation.org