changeset 398:435058da0eae

Use a default step width (100m) between two kilometers if no width is given. flys-artifacts/trunk@1828 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 05 May 2011 05:27:41 +0000
parents ae8fa86e6503
children 53cc794fee07
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu May 05 04:52:47 2011 +0000
+++ b/flys-artifacts/ChangeLog	Thu May 05 05:27:41 2011 +0000
@@ -1,3 +1,9 @@
+2011-05-05  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: Default
+	  step width between two kilometers added - if no step width is given,
+	  this default width is used.
+
 2011-05-05  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu May 05 04:52:47 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu May 05 05:27:41 2011 +0000
@@ -68,6 +68,9 @@
      * range.*/
     public static final int DEFAULT_Q_STEPS = 30;
 
+    /** The default step width between the start end end kilometer.*/
+    public static final double DEFAULT_KM_STEPS = 0.1;
+
 
     /** The identifier of the current state. */
     protected String currentStateId;
@@ -560,6 +563,10 @@
         // transform step from 'm' into 'km'
         step = step / 1000;
 
+        if (step == 0d) {
+            step = DEFAULT_KM_STEPS;
+        }
+
         return getExplodedValues(distance[0], distance[1], step);
     }
 

http://dive4elements.wald.intevation.org