Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/statistics/TimeseriesVectorStatistics.java @ 1139:3a28fef65500
dummy merge for repo head
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:15:16 +0200 |
parents | f953c9a559d8 |
children |
rev | line source |
---|---|
1115
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1078
diff
changeset
|
1 /* |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1078
diff
changeset
|
2 * Copyright (c) 2010 by Intevation GmbH |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1078
diff
changeset
|
3 * |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1078
diff
changeset
|
4 * This program is free software under the LGPL (>=v2.1) |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1078
diff
changeset
|
5 * Read the file LGPL.txt coming with the software for details |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1078
diff
changeset
|
6 * or visit http://www.gnu.org/licenses/ if it does not exist. |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1078
diff
changeset
|
7 */ |
f953c9a559d8
Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1078
diff
changeset
|
8 |
1077
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 package de.intevation.gnv.statistics; |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.gnv.geobackend.base.Result; |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.gnv.geobackend.base.ResultDescriptor; |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import java.sql.SQLException; |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
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 * @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
|
19 */ |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 public class TimeseriesVectorStatistics |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 extends VectorStatistics |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 { |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 public TimeseriesVectorStatistics() { |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 } |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
1078
5659b5c5e4b5
Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1077
diff
changeset
|
27 protected void clear() { |
5659b5c5e4b5
Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1077
diff
changeset
|
28 // nothing to clear |
5659b5c5e4b5
Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1077
diff
changeset
|
29 } |
5659b5c5e4b5
Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1077
diff
changeset
|
30 |
5659b5c5e4b5
Added statistics for vectorial horizontalprofiles.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1077
diff
changeset
|
31 |
1077
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 protected int getValueIdx(ResultDescriptor rd) { |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 return rd.getColumnIndex("YORDINATE"); |
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 |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 protected double calculateXOrdinateValue(Result prev, Result row) |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 throws SQLException |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 { |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 return new Double((row.getDate("XORDINATE")).getTime() / 1000 / 3600); |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 } |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 } |
1728aac87717
Added statistics for vectorial timeseries.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |