comparison gnv-artifacts/doc/conf/queries.properties @ 209:d5cef9f17525

gnv-artifacts/trunk@265 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 23 Oct 2009 14:28:07 +0000
parents 01ac348ac4a4
children 310874d3573f
comparison
equal deleted inserted replaced
208:a33d59f5791a 209:d5cef9f17525
14 order by tsp.name 14 order by tsp.name
15 15
16 timeseries_parameter=SELECT DISTINCT \ 16 timeseries_parameter=SELECT DISTINCT \
17 p.PARAMETERID KEY, \ 17 p.PARAMETERID KEY, \
18 p.GERMANNAME VALUE \ 18 p.GERMANNAME VALUE \
19 from MEDIAN.PARAMETER p \ 19 FROM MEDIAN.PARAMETER P, \
20 where p.PARAMETERID in \ 20 MEDIAN.TIMESERIES TS, \
21 (select distinct \ 21 MEDIAN.TIMESERIESVALUE TSV, \
22 ts.PARAMETERID \ 22 MEDIAN.MEASUREMENT M, \
23 from MEDIAN.TIMESERIES ts \ 23 MEDIAN.TIMESERIESPOINT TSP \
24 where ts.TIMESERIESID in \ 24 WHERE M.FEATUREID = TSP.FEATUREID AND \
25 (select distinct \ 25 M.MEASUREMENTID = TSV.MEASUREMENTID AND \
26 tsv.TIMESERIESID \ 26 TS.TIMESERIESID = TSV.TIMESERIESID AND \
27 from MEDIAN.TIMESERIESVALUE tsv \ 27 P.PARAMETERID = TS.PARAMETERID AND \
28 where tsv.MEASUREMENTID in \ 28 TSP.FEATUREID = ? \
29 (select m.MEASUREMENTID \ 29 ORDER BY P.GERMANNAME
30 from MEDIAN.MEASUREMENT m, \ 30
31 MEDIAN.TIMESERIESPOINT tsp \
32 where m.FEATUREID = tsp.FEATUREID and \
33 tsp.FEATUREID IN ( ? )\
34 )\
35 )\
36 ) \
37 ORDER BY p.GERMANNAME
38
39 timeseries_depth_height=SELECT DISTINCT \ 31 timeseries_depth_height=SELECT DISTINCT \
40 m.MEASUREMENTID KEY, \ 32 M.MEASUREMENTID KEY, \
41 m.ZLOCATION VALUE \ 33 M.ZLOCATION VALUE \
42 from MEDIAN.MEASUREMENT m \ 34 FROM MEDIAN.MEASUREMENT M, \
43 where m.MEASUREMENTID in \ 35 MEDIAN.TIMESERIESVALUE TSV, \
44 (SELECT DISTINCT \ 36 MEDIAN.TIMESERIES T, \
45 t_v.MEASUREMENTID \ 37 MEDIAN.PARAMETER P \
46 from MEDIAN.TIMESERIESVALUE t_v \ 38 WHERE M.MEASUREMENTID = TSV.MEASUREMENTID AND \
47 where t_v.TIMESERIESID in \ 39 TSV.TIMESERIESID = T.TIMESERIESID AND \
48 (SELECT DISTINCT \ 40 T.PARAMETERID = P.PARAMETERID AND \
49 t.TIMESERIESID \ 41 M.FEATUREID = ? AND \
50 from MEDIAN.TIMESERIES t \ 42 P.PARAMETERID IN (?)\
51 where t.PARAMETERID in \
52 (SELECT DISTINCT \
53 p.PARAMETERID \
54 from MEDIAN.PARAMETER p \
55 where m.FEATUREID IN ( ? ) and \
56 p.PARAMETERID IN (?)\
57 )\
58 )\
59 )\
60 ORDER BY m.ZLOCATION DESC 43 ORDER BY m.ZLOCATION DESC
61 44
62 timeseries_interval=select min(tv.TIMEVALUE) MIN, \ 45 timeseries_interval=select min(tv.TIMEVALUE) MIN, \
63 max(tv.TIMEVALUE) MAX \ 46 max(tv.TIMEVALUE) MAX \
64 from MEDIAN.TIMESERIES t , \ 47 from MEDIAN.TIMESERIES t , \
93 timeseries_mesh = SELECT OBJECTID KEY, \ 76 timeseries_mesh = SELECT OBJECTID KEY, \
94 m.NAME VALUE \ 77 m.NAME VALUE \
95 FROM MEDIAN.MESH m \ 78 FROM MEDIAN.MESH m \
96 WHERE SOURCEID IN (?) \ 79 WHERE SOURCEID IN (?) \
97 ORDER BY m.NAME 80 ORDER BY m.NAME
98 timeseries_meshpoint = SELECT FEATUREID, \ 81 timeseries_meshpoint = SELECT MEDIAN.MESHPOINT.FEATUREID, \
99 ST_ASTEXT(SHAPE) \ 82 ST_ASTEXT(SHAPE) \
100 FROM MEDIAN.MESHPOINT \ 83 FROM MEDIAN.MESHPOINT, \
101 WHERE MESHID in \ 84 MEDIAN.MESH M \
102 (SELECT DISTINCT MESHID \ 85 WHERE MEDIAN.MESHPOINT.MESHID = M.MESHID AND \
103 FROM MEDIAN.MESH \
104 WHERE OBJECTID = ?) AND \
105 KPOSITION = 1 AND \ 86 KPOSITION = 1 AND \
87 M.OBJECTID = ? AND \
106 INTERSECTS(SHAPE,"?") 88 INTERSECTS(SHAPE,"?")
107 89
108 timeseries_meshpoint_depth = select mp.FEATUREID KEY, \ 90 timeseries_meshpoint_depth = SELECT MP.FEATUREID KEY, \
109 'Layer ' || ml.KPOSITION || ': ' || -ml.UPPERZLOCATION || ' - '|| -ml.LOWERZLOCATION as VALUE \ 91 'Layer ' || ML.KPOSITION || ': ' || -ML.UPPERZLOCATION || ' - '|| -ML.LOWERZLOCATION VALUE \
110 from MEDIAN.MESHLAYER ml, \ 92 from MEDIAN.MESHLAYER ML, \
111 MEDIAN.MESHPOINT mp \ 93 MEDIAN.MESHPOINT MP, \
112 where ml.KPOSITION = mp.KPOSITION and \ 94 MEDIAN.MESH M \
113 ml.MESHID = mp.MESHID and \ 95 WHERE ML.KPOSITION = MP.KPOSITION AND \
114 mp.FEATUREID in \ 96 ML.MESHID = MP.MESHID AND \
115 ( select FEATUREID \ 97 M.OBJECTID = ? AND \
116 from MEDIAN.MESHPOINT mp, \ 98 MP.MESHID = M.MESHID AND \
117 MEDIAN.MESH m \ 99 IPOSITION = (select IPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?) AND \
118 where m.OBJECTID = ? AND \ 100 JPOSITION = (select JPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?) \
119 mp.MESHID = m.MESHID AND \ 101 ORDER BY ML.UPPERZLOCATION DESC
120 IPOSITION = (select IPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?) and \
121 JPOSITION = (select JPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?)) \
122 order by ml.UPPERZLOCATION desc
123 102
124 timeseries_mesh_parameter=SELECT distinct \ 103 timeseries_mesh_parameter=SELECT distinct \
125 p.PARAMETERID KEY , \ 104 p.PARAMETERID KEY , \
126 p.GERMANNAME VALUE \ 105 p.GERMANNAME VALUE \
127 from MEDIAN.PARAMETER p, \ 106 from MEDIAN.PARAMETER p, \
555 order by msv.TIMEVALUE, \ 534 order by msv.TIMEVALUE, \
556 msv.PARAMETERID, \ 535 msv.PARAMETERID, \
557 MEDIAN.MESHPOINT.JPOSITION , \ 536 MEDIAN.MESHPOINT.JPOSITION , \
558 MEDIAN.MESHPOINT.IPOSITION, \ 537 MEDIAN.MESHPOINT.IPOSITION, \
559 MEDIAN.MESHPOINT.KPOSITION 538 MEDIAN.MESHPOINT.KPOSITION
539
540
541 select mp.FEATUREID KEY, 'Layer ' || ml.KPOSITION || ': ' || -ml.UPPERZLOCATION || ' - '|| -ml.LOWERZLOCATION as VALUE from MEDIAN.MESHLAYER ml, MEDIAN.MESHPOINT mp, MEDIAN.MESH M where ml.KPOSITION = mp.KPOSITION and ml.MESHID = mp.MESHID and m.OBJECTID = 3 AND mp.MESHID = m.MESHID AND IPOSITION = (select IPOSITION from MEDIAN.MESHPOINT where FEATUREID = 2003771) and JPOSITION = (select JPOSITION from MEDIAN.MESHPOINT where FEATUREID = 2003771) order by ml.UPPERZLOCATION desc

http://dive4elements.wald.intevation.org