comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/river/RiverInfoProvider.java @ 9505:3f230fe8eb19

Bezugspegel-assignment changed for coinciding gauge and calculation range (Meilenstein-2 2.2.4)
author mschaefer
date Fri, 28 Sep 2018 10:16:12 +0200
parents 853f2dafc16e
children 1722727803f7
comparison
equal deleted inserted replaced
9504:76c0665888a3 9505:3f230fe8eb19
46 if (calcRange == null) 46 if (calcRange == null)
47 gauges = river.getGauges(); 47 gauges = river.getGauges();
48 else 48 else
49 gauges = river.determineGauges(calcRange.getMinimumDouble(), calcRange.getMaximumDouble()); 49 gauges = river.determineGauges(calcRange.getMinimumDouble(), calcRange.getMaximumDouble());
50 50
51 // If the range starts exactly at a gauge's range end, determineGauges gets this gauge as the first in list,
52 // but we want the list to start with the next gauge, i.e. that one that starts with the calc range,
53 // therefore we remove the first one
54 // REMARK Bei abwärts kilometriertem Fluss den letzten Gauge in der Liste prüfen (Ende)/entfernen
55 if ((gauges.size() >= 2) && (Math.abs(gauges.get(0).getRange().getB().doubleValue() - calcRange.getMinimumDouble()) < 0.0001))
56 gauges.remove(0);
51 final GaugeIndex gaugeIndex = new GaugeIndex(gauges); 57 final GaugeIndex gaugeIndex = new GaugeIndex(gauges);
52 58
53 final String notinrange = Resources.getMsg(context.getMeta(), CSV_NOT_IN_GAUGE_RANGE, CSV_NOT_IN_GAUGE_RANGE); 59 final String notinrange = Resources.getMsg(context.getMeta(), CSV_NOT_IN_GAUGE_RANGE, CSV_NOT_IN_GAUGE_RANGE);
54 60
55 if (firstGaugeIsRefGauge && !gauges.isEmpty()) 61 if (firstGaugeIsRefGauge && !gauges.isEmpty())

http://dive4elements.wald.intevation.org