# HG changeset patch # User Ingo Weinzierl # Date 1304573261 0 # Node ID 435058da0eaed60c886ec5c47cb5fb2d85d43973 # Parent ae8fa86e65033249f29b22483e7c1501994b1ad6 Use a default step width (100m) between two kilometers if no width is given. flys-artifacts/trunk@1828 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r ae8fa86e6503 -r 435058da0eae flys-artifacts/ChangeLog --- 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 + + * 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 * src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java: diff -r ae8fa86e6503 -r 435058da0eae flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.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); }