Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 628:51b69bca4560
ISSUE-85 (part III/III) Use the given kilometer values for the waterlevel computation.
flys-artifacts/trunk@1993 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 24 May 2011 12:37:45 +0000 |
parents | 833290f16f09 |
children | a9af60c84dca |
comparison
equal
deleted
inserted
replaced
627:833290f16f09 | 628:51b69bca4560 |
---|---|
37 | 37 |
38 import de.intevation.flys.artifacts.context.FLYSContext; | 38 import de.intevation.flys.artifacts.context.FLYSContext; |
39 import de.intevation.flys.artifacts.model.DischargeTables; | 39 import de.intevation.flys.artifacts.model.DischargeTables; |
40 import de.intevation.flys.artifacts.model.RiverFactory; | 40 import de.intevation.flys.artifacts.model.RiverFactory; |
41 import de.intevation.flys.artifacts.states.DefaultState; | 41 import de.intevation.flys.artifacts.states.DefaultState; |
42 import de.intevation.flys.artifacts.states.LocationDistanceSelect; | |
42 | 43 |
43 | 44 |
44 /** | 45 /** |
45 * The defaul FLYS artifact. | 46 * The defaul FLYS artifact. |
46 * | 47 * |
473 return true; | 474 return true; |
474 } | 475 } |
475 | 476 |
476 String value = (String) mode.getValue(); | 477 String value = (String) mode.getValue(); |
477 | 478 |
478 return value.equals("range"); | 479 return value.equals("distance"); |
479 } | 480 } |
480 | 481 |
481 | 482 |
482 /** | 483 /** |
483 * This method returns the given distance | 484 * This method returns the given distance |
591 * Returns the selected Kms. | 592 * Returns the selected Kms. |
592 * | 593 * |
593 * @return the selected kms. | 594 * @return the selected kms. |
594 */ | 595 */ |
595 public double[] getKms() { | 596 public double[] getKms() { |
596 double[] distance = getDistance(); | 597 if (isRange()) { |
597 return getKms(distance); | 598 double[] distance = getDistance(); |
599 return getKms(distance); | |
600 | |
601 } | |
602 else { | |
603 return LocationDistanceSelect.getLocations(this); | |
604 } | |
598 } | 605 } |
599 | 606 |
600 | 607 |
601 /** | 608 /** |
602 * Returns the gauge based on the current distance and river. | 609 * Returns the gauge based on the current distance and river. |