annotate gnv-artifacts/src/main/java/de/intevation/gnv/statistics/TimeseriesVectorStatistics.java @ 1091:fb2d07f7a5ae

Added configuration and sql statements for a new product named 'Achsenparalleler Vertikalschnitt. gnv-artifacts/trunk@1205 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Sat, 12 Jun 2010 13:06:40 +0000
parents 5659b5c5e4b5
children f953c9a559d8
rev   line source
1077
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.gnv.statistics;
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import de.intevation.gnv.geobackend.base.Result;
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import de.intevation.gnv.geobackend.base.ResultDescriptor;
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 import java.sql.SQLException;
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 /**
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 */
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 public class TimeseriesVectorStatistics
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 extends VectorStatistics
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 {
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 public TimeseriesVectorStatistics() {
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 }
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
1078
5659b5c5e4b5 Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1077
diff changeset
19 protected void clear() {
5659b5c5e4b5 Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1077
diff changeset
20 // nothing to clear
5659b5c5e4b5 Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1077
diff changeset
21 }
5659b5c5e4b5 Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1077
diff changeset
22
5659b5c5e4b5 Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1077
diff changeset
23
1077
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 protected int getValueIdx(ResultDescriptor rd) {
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 return rd.getColumnIndex("YORDINATE");
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 }
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 protected double calculateXOrdinateValue(Result prev, Result row)
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 throws SQLException
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 {
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 return new Double((row.getDate("XORDINATE")).getTime() / 1000 / 3600);
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 }
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 }
1728aac87717 Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org