Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 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 | dcc3cd962c0e |
children | 53cc794fee07 |
line wrap: on
line diff
--- 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); }