Mercurial > dive4elements > river
changeset 8759:2faf6cef6f5f
(issue1801) Remove indirection via RiverUtils for obtaining reference gauge.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 26 Jun 2015 18:11:27 +0200 |
parents | d4caab3fedde |
children | 9483a5bf4219 |
files | artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java |
diffstat | 1 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java Fri Jun 26 16:23:32 2015 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java Fri Jun 26 18:11:27 2015 +0200 @@ -670,9 +670,14 @@ int size = wqkms.size(); double[] result = new double[3]; - D4EArtifact flys = (D4EArtifact) master; + D4EArtifact flys = (D4EArtifact) master; + RangeAccess rangeAccess = new RangeAccess(flys); + List<Gauge> gauges = RiverUtils.getGauges(flys); - Gauge gauge = RiverUtils.getGauge(flys); + + Gauge gauge = rangeAccess.getRiver().determineRefGauge( + rangeAccess.getKmRange(), rangeAccess.isRange()); + String gaugeName = gauge.getName(); String desc = ""; String notinrange = msg( @@ -1006,8 +1011,12 @@ int size = wqkms.size(); double[] result = new double[3]; - D4EArtifact flys = (D4EArtifact) master; - Gauge gauge = RiverUtils.getGauge(flys); + D4EArtifact flys = (D4EArtifact) master; + RangeAccess rangeAccess = new RangeAccess(flys); + + Gauge gauge = rangeAccess.getRiver().determineRefGauge( + rangeAccess.getKmRange(), rangeAccess.isRange()); + String gaugeName = gauge.getName(); String desc = ""; String notinrange = msg(