changeset 4150:0f60efc39953

Workaround for #961
author Christian Lins <christian.lins@intevation.de>
date Tue, 16 Oct 2012 12:17:53 +0200
parents 71a4b664a16a
children 0182916dcb01
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/BedHeightAccess.java flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java
diffstat 3 files changed, 17 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Oct 16 11:36:21 2012 +0200
+++ b/flys-artifacts/ChangeLog	Tue Oct 16 12:17:53 2012 +0200
@@ -1,3 +1,9 @@
+2012-10-16	Christian Lins	<christian.lins@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/access/BedHeightAccess.java,
+	  src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java:
+	  Workaround for double facets in "Mittlere Sohlh√he" (#961).
+
 2012-10-16	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Fix issue946.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/BedHeightAccess.java	Tue Oct 16 11:36:21 2012 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/BedHeightAccess.java	Tue Oct 16 12:17:53 2012 +0200
@@ -1,12 +1,12 @@
 package de.intevation.flys.artifacts.access;
 
+import de.intevation.flys.artifacts.FLYSArtifact;
+import de.intevation.flys.artifacts.states.SoundingsSelect;
+
 import gnu.trove.TIntArrayList;
 
 import org.apache.log4j.Logger;
 
-import de.intevation.flys.artifacts.FLYSArtifact;
-import de.intevation.flys.artifacts.states.SoundingsSelect;
-
 
 public class BedHeightAccess extends Access {
 
@@ -51,6 +51,9 @@
                 logger.warn("No 'soundings' parameter specified!");
                 return null;
             }
+            else {
+                logger.debug("getBedHeightSingleIDs(): data=" + data);
+            }
 
             String[] parts = data.split(";");
 
@@ -61,7 +64,10 @@
                     String tmp = part.replace(SoundingsSelect.PREFIX_SINGLE, "");
 
                     try {
-                        ids.add(Integer.parseInt(tmp));
+                        int i = Integer.parseInt(tmp);
+                        if (!ids.contains(i)) {
+                            ids.add(i);
+                        }
                     }
                     catch (NumberFormatException nfe) {
                         logger.warn("Cannot parse int from string: '" + tmp + "'");
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java	Tue Oct 16 11:36:21 2012 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/MiddleBedHeightGenerator.java	Tue Oct 16 12:17:53 2012 +0200
@@ -13,7 +13,7 @@
 import org.jfree.data.xy.XYSeries;
 import org.w3c.dom.Document;
 
-
+// TODO Move class to de.intevation.flys.exports.minfo
 /**
  * An OutGenerator that generates middle bed height charts.
  *

http://dive4elements.wald.intevation.org