Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/WKmsImpl.java @ 7081:3c4efd4b2c19 generator-refactoring
Simplyfy / unify "invert axis" logic
- DataUtil now can check if two datasets are in the same direction
- In the case of WKM data a no means that the Water flows Right to Left
- If the water flows from right to left do inversion of diagrams
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 20 Sep 2013 17:36:11 +0200 |
parents | af13ceeba52a |
children | 1cff4c98df76 |
comparison
equal
deleted
inserted
replaced
7080:02a704a37323 | 7081:3c4efd4b2c19 |
---|---|
80 return kms.getQuick(index); | 80 return kms.getQuick(index); |
81 } | 81 } |
82 | 82 |
83 @Override | 83 @Override |
84 public boolean guessWaterIncreasing() { | 84 public boolean guessWaterIncreasing() { |
85 return guessWaterIncreasing(0.05f); | 85 return guessDataIncreasing(0.05f); |
86 } | 86 } |
87 | 87 |
88 protected boolean guessWaterIncreasing(float factor) { | 88 protected boolean guessDataIncreasing(float factor) { |
89 return DataUtil.guessWaterIncreasing(ws, factor); | 89 return DataUtil.guessDataIncreasing(ws, factor); |
90 } | |
91 | |
92 @Override | |
93 public boolean guessRTLData() { | |
94 return DataUtil.guessSameDirectionData(ws, allKms()); | |
90 } | 95 } |
91 | 96 |
92 @Override | 97 @Override |
93 public int size() { | 98 public int size() { |
94 return kms.size(); | 99 return kms.size(); |