Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/statistics/HorizontalProfileStatistics.java @ 778:9a828e5a2390
Removed trailing whitespace
gnv-artifacts/trunk@851 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Mar 2010 07:58:51 +0000 |
parents | e964a3d8f7bc |
children | b1f5f2a8840f |
comparison
equal
deleted
inserted
replaced
777:8009961db1cb | 778:9a828e5a2390 |
---|---|
16 import de.intevation.gnv.state.describedata.KeyValueDescibeData; | 16 import de.intevation.gnv.state.describedata.KeyValueDescibeData; |
17 import de.intevation.gnv.utils.DistanceCalculator; | 17 import de.intevation.gnv.utils.DistanceCalculator; |
18 | 18 |
19 /** | 19 /** |
20 * @author Tim Englich <tim.englich@intevation.de> | 20 * @author Tim Englich <tim.englich@intevation.de> |
21 * | 21 * |
22 */ | 22 */ |
23 public class HorizontalProfileStatistics extends TimeseriesStatistics { | 23 public class HorizontalProfileStatistics extends TimeseriesStatistics { |
24 | 24 |
25 private static Logger log = Logger.getLogger(HorizontalProfileStatistics.class); | 25 private static Logger log = Logger.getLogger(HorizontalProfileStatistics.class); |
26 | 26 |
27 private WKTReader wktReader = new WKTReader(); | 27 private WKTReader wktReader = new WKTReader(); |
28 | 28 |
29 private DistanceCalculator dc = new DistanceCalculator(); | 29 private DistanceCalculator dc = new DistanceCalculator(); |
30 | 30 |
31 private double distance = 0; | 31 private double distance = 0; |
32 | 32 |
33 /** | 33 /** |
34 * Constructor | 34 * Constructor |
35 */ | 35 */ |
36 public HorizontalProfileStatistics() { | 36 public HorizontalProfileStatistics() { |
37 super(); | 37 super(); |
45 throws SQLException { | 45 throws SQLException { |
46 try { | 46 try { |
47 Point start = (Point)this.wktReader.read(previousRow.getString("SHAPE")); | 47 Point start = (Point)this.wktReader.read(previousRow.getString("SHAPE")); |
48 Point current = (Point)this.wktReader.read(row.getString("SHAPE")); | 48 Point current = (Point)this.wktReader.read(row.getString("SHAPE")); |
49 double delta = this.dc.calculateDistance(start, current); | 49 double delta = this.dc.calculateDistance(start, current); |
50 | 50 |
51 if (!Double.isNaN(delta)){ | 51 if (!Double.isNaN(delta)){ |
52 this.distance = this.distance + delta; | 52 this.distance = this.distance + delta; |
53 } | 53 } |
54 } catch (ParseException e) { | 54 } catch (ParseException e) { |
55 log.error(e,e); | 55 log.error(e,e); |
66 String break2, | 66 String break2, |
67 String break3, | 67 String break3, |
68 Collection<KeyValueDescibeData> parameters, | 68 Collection<KeyValueDescibeData> parameters, |
69 Collection<KeyValueDescibeData> measurements, | 69 Collection<KeyValueDescibeData> measurements, |
70 Collection<KeyValueDescibeData> dates) { | 70 Collection<KeyValueDescibeData> dates) { |
71 return (this.findValueTitle(parameters, break1)+ " "+ | 71 return (this.findValueTitle(parameters, break1)+ " "+ |
72 this.findValueTitle(measurements,break2)).trim()+" "+ | 72 this.findValueTitle(measurements,break2)).trim()+" "+ |
73 this.findValueTitle(dates,break3); | 73 this.findValueTitle(dates,break3); |
74 } | 74 } |
75 | 75 |
76 /** | 76 /** |
77 * @see de.intevation.gnv.statistics.TimeseriesStatistics#clearStatistics() | 77 * @see de.intevation.gnv.statistics.TimeseriesStatistics#clearStatistics() |
78 */ | 78 */ |
79 @Override | 79 @Override |
80 protected void clearStatistics() { | 80 protected void clearStatistics() { |