Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WDifferencesState.java @ 1153:62ad0a753b68
Fix facet name and legend of w-differences, walk over distance state, too.
flys-artifacts/trunk@2684 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 09 Sep 2011 12:29:28 +0000 |
parents | 08048bd090e6 |
children | fbe18ad4caff |
comparison
equal
deleted
inserted
replaced
1152:fc572b30f1b8 | 1153:62ad0a753b68 |
---|---|
72 } | 72 } |
73 if (flys2 == null) { | 73 if (flys2 == null) { |
74 logger.warn("One of the artifacts (2) for diff calculation could not be loaded"); | 74 logger.warn("One of the artifacts (2) for diff calculation could not be loaded"); |
75 } | 75 } |
76 WKms wkms = null; | 76 WKms wkms = null; |
77 String facetName = "diff ()"; | |
77 | 78 |
78 if (flys1 != null && flys2 != null) { | 79 if (flys1 != null && flys2 != null) { |
80 // TODO also check size. | |
81 // TODO also need index of wqkms. | |
79 WQKms[] minuend = (WQKms[]) flys1.getWaterlevelData().getData(); | 82 WQKms[] minuend = (WQKms[]) flys1.getWaterlevelData().getData(); |
80 WQKms[] subtrahend = (WQKms[]) flys2.getWaterlevelData().getData(); | 83 WQKms[] subtrahend = (WQKms[]) flys2.getWaterlevelData().getData(); |
81 wkms = WKmsOperation.SUBTRACTION.operate(minuend[0], subtrahend[0]); | 84 wkms = WKmsOperation.SUBTRACTION.operate(minuend[0], subtrahend[0]); |
85 facetName = "W ("+minuend[0].getName() + ") - W (" + subtrahend[0].getName()+")"; | |
82 logger.warn("Did a WKMSSubtraction"); | 86 logger.warn("Did a WKMSSubtraction"); |
83 } | 87 } |
84 | 88 |
85 if (facets != null) { | 89 if (facets != null) { |
86 // TODO: pass computetype and state id. | 90 // TODO: pass computetype and state id. |
87 //, ComputeType.ADVANCE, getID(), hash)); | 91 //, ComputeType.ADVANCE, getID(), hash)); |
88 facets.add(new DataFacet(W_DIFFERENCES, "wdiff data")); | 92 facets.add(new DataFacet(W_DIFFERENCES, facetName)); |
89 } | 93 } |
90 else { | 94 else { |
91 logger.debug("Not adding facets in WDifferencesState."); | 95 logger.debug("Not adding facets in WDifferencesState."); |
92 } | 96 } |
93 | 97 |