Mercurial > dive4elements > river
changeset 5731:0152d639d7a7
FixWQCurveGenerator: Render fix events.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 16 Apr 2013 12:43:54 +0200 |
parents | 4ce126aa130c |
children | fdd2647d1912 |
files | flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java Tue Apr 16 12:42:54 2013 +0200 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java Tue Apr 16 12:43:54 2013 +0200 @@ -130,6 +130,9 @@ else if(QSECTOR.equals(name)) { doQSectorOut(aaf, doc, visible); } + else if(FIX_EVENTS.equals(name)) { + doEventsOut(aaf, doc, visible); + } else if(/*STATIC_WKMS_INTERPOL.equals(name) ||*/ STATIC_WKMS_MARKS.equals(name) || STATIC_WKMS.equals(name) || @@ -244,6 +247,21 @@ } } + protected void doEventsOut(ArtifactAndFacet aaf, Document doc, boolean visible) { + logger.debug("doEventsOut"); + // Find W/Q at km. + XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), doc); + Double ckm = (Double) context.getContextValue(CURRENT_KM); + WQKms wqkms = (WQKms) aaf.getData(context); + double[] kms = wqkms.getKms(); + for (int i = 0 ; i< kms.length; i++) { + if (Math.abs(kms[i] - ckm) <= 0.01d) { + series.add(wqkms.getQ(i), wqkms.getW(i)); + addAxisSeries(series, YAXIS.W.idx, visible); + return; + } + } + } protected void doWQCurveOut(ArtifactAndFacet aaf, Document doc, boolean visible) { logger.debug("doWQCurveOut");