Mercurial > dive4elements > river
changeset 2031:8e7e56db96a5
Make ('static') WKms data available for area calculations.
flys-artifacts/trunk@3494 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 20 Dec 2011 12:06:35 +0000 |
parents | 355495661a1c |
children | 5746c74c69cf |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WKmsFacet.java flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java |
diffstat | 3 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Dec 20 11:48:24 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Dec 20 12:06:35 2011 +0000 @@ -1,3 +1,11 @@ +2011-12-20 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/WKmsFacet.java: + Subclass BlackboardDataFacet to provide data for area calculation. + + * src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java: + Cast data to WKms instead of WQKms. + 2011-12-20 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/artifacts/states/WQSelect.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WKmsFacet.java Tue Dec 20 11:48:24 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WKmsFacet.java Tue Dec 20 12:06:35 2011 +0000 @@ -3,8 +3,6 @@ import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; -import de.intevation.artifactdatabase.state.DefaultFacet; - import de.intevation.flys.artifacts.StaticWKmsArtifact; import de.intevation.flys.artifacts.model.FacetTypes; @@ -12,7 +10,7 @@ * Facet to show W|km Values. */ public class WKmsFacet -extends DefaultFacet +extends BlackboardDataFacet implements FacetTypes { /** Trivial Constructor. */
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Tue Dec 20 11:48:24 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java Tue Dec 20 12:06:35 2011 +0000 @@ -505,8 +505,8 @@ if (doubles[1] != null) { up = new StyledXYSeries(seriesName, false, theme); - if (doubles[1] instanceof WQKms) { - StyledSeriesBuilder.addPoints(up, (WQKms) doubles[1]); + if (doubles[1] instanceof WKms) { + StyledSeriesBuilder.addPoints(up, (WKms) doubles[1]); } else if (doubles[1] instanceof double[][]) { StyledSeriesBuilder.addPoints(up, (double [][]) doubles[1]); @@ -522,7 +522,7 @@ // the renderer (or anything in between) will not work correctly. down = new StyledXYSeries(seriesName + " ", false, theme); if (doubles[0] instanceof WQKms) { - StyledSeriesBuilder.addPoints(down, (WQKms) doubles[0]); + StyledSeriesBuilder.addPoints(down, (WKms) doubles[0]); } else if (doubles[0] instanceof double[][]) { StyledSeriesBuilder.addPoints(down, (double[][]) doubles[0]);