comparison 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
comparison
equal deleted inserted replaced
397:ae8fa86e6503 398:435058da0eae
65 public static final String OPERATION_FAILED = "FAILURE"; 65 public static final String OPERATION_FAILED = "FAILURE";
66 66
67 /** The default number of steps between the start end end of a selected Q 67 /** The default number of steps between the start end end of a selected Q
68 * range.*/ 68 * range.*/
69 public static final int DEFAULT_Q_STEPS = 30; 69 public static final int DEFAULT_Q_STEPS = 30;
70
71 /** The default step width between the start end end kilometer.*/
72 public static final double DEFAULT_KM_STEPS = 0.1;
70 73
71 74
72 /** The identifier of the current state. */ 75 /** The identifier of the current state. */
73 protected String currentStateId; 76 protected String currentStateId;
74 77
558 double lower = distance[0]; 561 double lower = distance[0];
559 562
560 // transform step from 'm' into 'km' 563 // transform step from 'm' into 'km'
561 step = step / 1000; 564 step = step / 1000;
562 565
566 if (step == 0d) {
567 step = DEFAULT_KM_STEPS;
568 }
569
563 return getExplodedValues(distance[0], distance[1], step); 570 return getExplodedValues(distance[0], distance[1], step);
564 } 571 }
565 572
566 573
567 /** 574 /**

http://dive4elements.wald.intevation.org