Mercurial > dive4elements > river
changeset 1820:d562772a418e
CrossSectionApp: Re-enabled dumping data to disk.
flys-artifacts/trunk@3149 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 03 Nov 2011 10:14:51 +0000 |
parents | dabd2ac83159 |
children | e55f1a851923 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java |
diffstat | 2 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Thu Nov 03 10:02:22 2011 +0000 +++ b/flys-artifacts/ChangeLog Thu Nov 03 10:14:51 2011 +0000 @@ -1,3 +1,13 @@ +2011-11-03 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java: + Reenabled dumping data to disk. + +2011-11-03 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/exports/ComputedDischargeCurveGenerator.java: + Removed superfluous import. + 2011-11-03 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java Thu Nov 03 10:02:22 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/charts/CrossSectionApp.java Thu Nov 03 10:14:51 2011 +0000 @@ -60,8 +60,6 @@ import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; -import org.jfree.data.xy.DefaultXYDataset; -import org.jfree.data.xy.XYDataset; import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection; @@ -355,9 +353,6 @@ } protected void dumpData() { - } - /* - protected void dumpData() { CrossSectionLineItem csli = (CrossSectionLineItem)crossSectionLinesCB.getSelectedItem(); @@ -366,9 +361,8 @@ return; } - CrossSectionLine line = csli.line; - double km = Math.round(line.getKm().doubleValue() * 1000d)/1000d; + double km = Math.round(csli.km.doubleValue() * 1000d)/1000d; String kmS = String.valueOf(km).replace(".", "-"); @@ -380,8 +374,6 @@ System.err.println("dump points to file '" + file + "'"); - List<CrossSectionPoint> points = line.getPoints(); - PrintWriter out = null; MathContext mc = new MathContext(3); @@ -391,10 +383,13 @@ new PrintWriter( new FileWriter(file)); - for (CrossSectionPoint point: points) { - out.println( - point.getX().round(mc) + " " + - point.getY().round(mc)); + for (Pair<CrossSection, CrossSectionLine> pair: csli.lines) { + out.println("# " + pair.getA().getDescription()); + for (CrossSectionPoint point: pair.getB().getPoints()) { + out.println( + point.getX().round(mc) + " " + + point.getY().round(mc)); + } } out.flush(); @@ -408,7 +403,6 @@ } } } - */ public void generateWaterLevels( List<Point2D> points,