Mercurial > dive4elements > river
changeset 6940:274948f91dd6
issue1466: Fix, sort stations before gap detection.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 29 Aug 2013 11:33:30 +0200 |
parents | 765cf5fe26c3 |
children | d322da01d862 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java Thu Aug 29 09:14:53 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java Thu Aug 29 11:33:30 2013 +0200 @@ -31,6 +31,7 @@ import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.TreeSet; import java.util.TreeMap; import org.apache.log4j.Logger; @@ -105,7 +106,7 @@ TDoubleArrayList xPos = new TDoubleArrayList(); TDoubleArrayList yPos = new TDoubleArrayList(); double lastX = -1d; - for (double km: load.getKms()) { + for (double km: new TreeSet<Double>(load.getKms())) { SedimentLoadFraction fraction = load.getFraction(km); if (fraction.getTotal() != 0) { if (Math.abs(lastX-km) >= EPSILON) {