changeset 83:5c8e54726a58

Added Support for Vertical Profiles Mesh gnv-artifacts/trunk@113 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Wed, 23 Sep 2009 11:57:08 +0000
parents 5eb62df21f9a
children c8d1f7b9e5a8
files gnv-artifacts/Changelog gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileMeshArtifact.java gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java gnv-artifacts/src/test/ressources/conf.xml gnv-artifacts/src/test/ressources/queries.properties
diffstat 6 files changed, 290 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/Changelog	Tue Sep 22 13:20:30 2009 +0000
+++ b/gnv-artifacts/Changelog	Wed Sep 23 11:57:08 2009 +0000
@@ -1,3 +1,16 @@
+2009-09-23  Tim Englich  <tim.englich@intevation.de>
+
+    * src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java (createXYSeries) Edited:
+    Bug fixed. Now all Values will be Renderd to the Chart 
+    * src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileMeshArtifact.java Added:
+      Artifact-class for VerticalProfile Mesh added
+    * src/main/java/de/intevation/gnv/transition/TransitionBase.java Edited:
+      Support for StringQuieries and OracleDateQueries added 
+    * src/test/ressources/queries.properties Edited: 
+      Queries for VerticalProfile Mesh integrated
+    * src/test/ressources/conf.xml Edited:
+      Artifact for VerticalProfile Mesh integrated
+      
 2009-09-22  Tim Englich  <tim.englich@intevation.de>
 
     * src/test/ressources/queries.properties Edited:
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java	Tue Sep 22 13:20:30 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java	Wed Sep 23 11:57:08 2009 +0000
@@ -270,7 +270,7 @@
     			break1 = row.getString("GROUP1"); // 2
     			break2 = row.getString("GROUP2");  //3
     			break3 = row.getString("GROUP3"); // 4
-    			int i = 0;
+    			int i = 1;
     			while (resultIterator.hasNext()) {
     			    row = resultIterator.next();
     				if (!break1.equals(row.getString("GROUP1"))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/profile/vertical/VerticalProfileMeshArtifact.java	Wed Sep 23 11:57:08 2009 +0000
@@ -0,0 +1,32 @@
+/**
+ *
+ */
+package de.intevation.gnv.profile.vertical;
+
+import org.apache.log4j.Logger;
+
+/**
+ * @author Tim Englich <tim.englich@intevation.de>
+ *
+ */
+public class VerticalProfileMeshArtifact extends VerticalProfileArtifact {
+    /**
+     * the logger, used to log exceptions and additonaly information
+     */
+    private static Logger log = Logger.getLogger(VerticalProfileMeshArtifact.class);
+    
+    
+    /**
+     * The UID of this class
+     */
+    private static final long serialVersionUID = -8291547966693867205L;
+    
+    /**
+     * Constructor
+     */
+    public VerticalProfileMeshArtifact(){
+        super();
+        log.debug("VerticalProfileMeshArtifact.Constructor");
+        super.name = super.name+ "Mesh";
+    }
+}
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Tue Sep 22 13:20:30 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java	Wed Sep 23 11:57:08 2009 +0000
@@ -295,9 +295,18 @@
             while (it.hasNext()){
                 String value = it.next();
                 InputData data = this.inputData.get(value);
-                int size = this.inputValues.get(data.getName()).usedInQueries();
-                for (int j = 0; j < size; j++){
-                    list.add(data.getValue());
+                if (data != null && this.inputValues.containsKey(data.getName())){
+                    int size = this.inputValues.get(data.getName()).usedInQueries();
+                    String type = this.inputValues.get(data.getName()).getType();
+                    String requestValue = data.getValue();
+                    if (type.equalsIgnoreCase("string")){
+                        requestValue = this.prepareInputData4DBQuery(requestValue);
+                    }else if (type.equalsIgnoreCase("date")){
+                        requestValue = this.prepareInputData4DateDBQuery(requestValue);
+                    }
+                    for (int j = 0; j < size; j++){
+                        list.add(requestValue);
+                    }
                 }
             }
             String[] filterValues = list.toArray(new String[0]);
@@ -316,6 +325,38 @@
             throw new TransitionException(e);
         }
     }
+    
+    private String prepareInputData4DateDBQuery(String value){
+        if (value != null){
+            String[] values = value.split(",");
+            String newValue = "";
+            for (int i = 0; i < values.length; i++){
+                if (newValue.length() > 0){
+                    newValue= newValue + " , ";
+                }
+                newValue = "to_date('"+values[0].trim()+"', 'YYYY.MM.DD HH24:MI:SS')"; // TODO JUST HACK FIND A BETTER RESOLUTION
+            }
+            return newValue;
+        }
+        
+        return value; 
+    }
+    private String prepareInputData4DBQuery(String value){
+        if (value != null){
+            String[] values = value.split(",");
+            String newValue = "";
+            for (int i = 0; i < values.length; i++){
+                if (newValue.length() > 0){
+                    newValue= newValue + " , ";
+                }
+                newValue = "'"+values[0].trim()+"'";
+            }
+            return newValue;
+        }
+        
+        return value; 
+        
+    }
 
     /**
      * @param result
--- a/gnv-artifacts/src/test/ressources/conf.xml	Tue Sep 22 13:20:30 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/conf.xml	Wed Sep 23 11:57:08 2009 +0000
@@ -24,7 +24,7 @@
                     </parameters>
                 </product>
                  <product name= "verticalProfile">
-                    <artifact-factory name="timeSeries" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
+                    <artifact-factory name="verticalProfile" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
                              ttl="300000" artifact="de.intevation.gnv.profile.vertical.VerticalProfileArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
                     <parameters>
                         <parameter name="sourceid" value="4"/>
@@ -42,7 +42,7 @@
                     </parameters>
                 </product>
                 <product name= "verticalProfile">
-                    <artifact-factory name="timeSeries" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
+                    <artifact-factory name="verticalProfile" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
                              ttl="300000" artifact="de.intevation.gnv.profile.vertical.VerticalProfileArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
                     <parameters>
                         <parameter name="sourceid" value="18"/>
@@ -60,7 +60,7 @@
                     </parameters>
                 </product>
                 <product name= "verticalProfile">
-                    <artifact-factory name="timeSeries" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
+                    <artifact-factory name="verticalProfile" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
                              ttl="300000" artifact="de.intevation.gnv.profile.vertical.VerticalProfileArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
                     <parameters>
                         <parameter name="sourceid" value="17"/>
@@ -75,6 +75,11 @@
                               ttl="300000" artifact="de.intevation.gnv.timeseries.TimeSeriesMeshArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
                     <parameters></parameters>
                 </product>
+                <product name= "verticalProfile">
+                    <artifact-factory name="verticalProfileMesh" description="Artiefactfactory for Instantiating the Artifact for the FIS Modeldata"  
+                             ttl="300000" artifact="de.intevation.gnv.profile.vertical.VerticalProfileMeshArtifact">de.intevation.artifactdatabase.DefaultArtifactFactory</artifact-factory>
+                    <parameters></parameters>
+                </product>
             </products>
         </artifact>
         
@@ -112,7 +117,7 @@
                     </reachableTransitions>
                     <inputvalues>
                          <inputvalue name="featureid" type="Integer" multiselect="false"/>
-                         <inputvalue name="mesh_coordinate" type="Integer" multiselect="false"/>
+                         <inputvalue name="mesh_coordinate" type="Integer" multiselect="false" usedinquery="0"/>
                     </inputvalues>
                 </transition>
                 
@@ -162,9 +167,9 @@
                     <queryID>timeseries_mesh_chart_data</queryID>
                     <inputvalues>
                         <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="parameterid"   type="Integer" multiselect="true" usedinquery="1"/>
                          <inputvalue name="measurementid" type="Integer" multiselect="false" usedinquery="1"/>
-                         <inputvalue name="parameterid"   type="Integer" multiselect="true" usedinquery="1"/>
-                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="1"/>
                          <inputvalue name="minvalue" type="Integer" multiselect="false" usedinquery="1"/>
                          <inputvalue name="maxvalue" type="Integer" multiselect="false" usedinquery="1"/>
                     </inputvalues>
@@ -293,7 +298,7 @@
                     <inputvalues>
                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
                         <inputvalue name="parameterid" type="Integer" multiselect="true"/>
-                        <inputvalue name="dateid" type="String" multiselect="true"/>
+                        <inputvalue name="dateid" type="Date" multiselect="true"/>
                     </inputvalues>
                     <outputsModes>
                         <outputsMode name="chart" description="Chartrepresentation of the Values" mime-type="image/png"/>
@@ -303,6 +308,87 @@
                 </transition>
             </transitions>
         </artifact>
+        
+         <artifact name="verticalProfileMesh">
+            <transitions>
+             <transition id="verticalprofile_mesh" description="verticalprofile_mesh" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>verticalprofile_mesh</queryID>
+                    <dataname>featureid</dataname>
+                    <data-multiselect>false</data-multiselect>
+                    <reachableTransitions>
+                           <transition>verticalprofile_mesh_coordinate</transition>
+                    </reachableTransitions>
+                    <inputvalues>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="verticalprofile_mesh_coordinate" description="verticalprofile_mesh_coordinate" transition="de.intevation.gnv.transition.SingleInputTransition">
+                    <dataname>verticalprofile_mesh_coordinate</dataname>
+                    <data-multiselect>false</data-multiselect>
+                    <reachableTransitions>
+                           <transition>verticalprofile_mesh_point</transition>v
+                    </reachableTransitions>
+                    <inputvalues>
+                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="verticalprofile_mesh_point" description="verticalprofile_mesh_point" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>verticalprofile_mesh_point</queryID>
+                    <dataname>mesh_point</dataname>
+                    <data-multiselect>false</data-multiselect>
+                    <reachableTransitions>
+                        <transition>verticalprofile_meshpoint_parameter</transition>v
+                    </reachableTransitions>
+                    <inputvalues>
+                         <inputvalue name="featureid" type="Integer" multiselect="false"/>
+                         <inputvalue name="mesh_coordinate" type="Integer" multiselect="false"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="verticalprofile_meshpoint_parameter" description="verticalprofile_meshpoint_parameter" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>verticalprofile_mesh_parameter</queryID>
+                    <dataname>parameterid</dataname>
+                    <data-multiselect>true</data-multiselect>
+                    <reachableTransitions>
+                        <transition>verticalprofile_mesh_date</transition>
+                    </reachableTransitions>
+                    <inputvalues>
+                         <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                         <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="verticalprofile_mesh_date" description="verticalprofile_mesh_date" transition="de.intevation.gnv.transition.DefaultTransition">
+                    <queryID>verticalprofile_mesh_date</queryID>
+                    <dataname>dateid</dataname>
+                    <data-multiselect>true</data-multiselect>
+                    <reachableTransitions>
+                         <transition>verticalprofile_mesh_calculate_results</transition>
+                    </reachableTransitions>
+                    <inputvalues>
+                        <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="1"/>
+                        <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="0"/>
+                        <inputvalue name="parameterid" type="Integer" multiselect="true"/>
+                    </inputvalues>
+                </transition>
+                
+                <transition id="verticalprofile_mesh_calculate_results" description="verticalprofile_mesh_calculate_results" transition="de.intevation.gnv.transition.profile.vertical.VerticalProfileOutputTransition">
+                    <queryID>verticalprofile_mesh_chart_data</queryID>
+                    <inputvalues>
+                        <inputvalue name="parameterid" type="Integer" multiselect="true" usedinquery="1"/>
+                        <inputvalue name="dateid" type="Date" multiselect="true" usedinquery="1"/>
+                        <inputvalue name="featureid" type="Integer" multiselect="false" usedinquery="2"/>
+                        <inputvalue name="mesh_point" type="Integer" multiselect="false" usedinquery="2"/> 
+                    </inputvalues>
+                    <outputsModes>
+                        <outputsMode name="chart" description="Chartrepresentation of the Values" mime-type="image/png"/>
+                        <outputsMode name="csv" description="CSV-Export der Daten" mime-type="test/plain"/>
+                        <outputsMode name="statistics" description="Statistik zu den Daten" mime-type="test/plain"/>
+                    </outputsModes>
+                </transition>
+            </transitions>
+         </artifact>
     </artifacts>
     <geo-backend>
         <backend-configuration>../geo-backend/src/test/ressources/ArcSDEConnectionPoolTestCase.properties</backend-configuration>
--- a/gnv-artifacts/src/test/ressources/queries.properties	Tue Sep 22 13:20:30 2009 +0000
+++ b/gnv-artifacts/src/test/ressources/queries.properties	Wed Sep 23 11:57:08 2009 +0000
@@ -1,20 +1,47 @@
+#############################################
+#############################################
+##########     Zeitserie       ##############
+#############################################
+#############################################
+
 timeseries_timeseriespoint=SELECT DISTINCT tsp.FEATUREID KEY, tsp.NAME VALUE FROM MEDIAN.TIMESERIESPOINT tsp, MEDIAN.MEASUREMENT mmt WHERE tsp.FEATUREID =  mmt.FEATUREID AND mmt.SOURCEID = ? order by tsp.name
 timeseries_parameter=SELECT DISTINCT p.PARAMETERID KEY, p.GERMANNAME VALUE from MEDIAN.PARAMETER p where p.PARAMETERID in (select distinct ts.PARAMETERID from MEDIAN.TIMESERIES ts where ts.TIMESERIESID in (select distinct tsv.TIMESERIESID from MEDIAN.TIMESERIESVALUE tsv where tsv.MEASUREMENTID in (select m.MEASUREMENTID from MEDIAN.MEASUREMENT m, MEDIAN.TIMESERIESPOINT tsp where m.FEATUREID = tsp.FEATUREID and tsp.FEATUREID IN ( ? )))) ORDER BY p.GERMANNAME
 timeseries_depth_height=SELECT DISTINCT m.MEASUREMENTID KEY, m.ZLOCATION VALUE from MEDIAN.MEASUREMENT m where m.MEASUREMENTID in (SELECT DISTINCT  t_v.MEASUREMENTID from MEDIAN.TIMESERIESVALUE t_v where t_v.TIMESERIESID in (SELECT DISTINCT  t.TIMESERIESID from MEDIAN.TIMESERIES t where t.PARAMETERID in (SELECT DISTINCT  p.PARAMETERID from MEDIAN.PARAMETER p where m.FEATUREID IN ( ? ) and p.PARAMETERID IN (?))))ORDER BY m.ZLOCATION DESC
 timeseries_interval=select min(tv.TIMEVALUE) MIN, max(tv.TIMEVALUE) MAX from MEDIAN.TIMESERIES t , MEDIAN.TIMESERIESVALUE tv where tv.TIMESERIESID = t.TIMESERIESID AND t.PARAMETERID IN ( ? ) AND tv.MEASUREMENTID IN ( ? )
-timeseries_chart_data=SELECT tv.TIMEVALUE XORDINATE, tv.DATAVALUE YORDINATE, t.PARAMETERID GROUP1, tv.MEASUREMENTID GROUP2, tv.TIMESERIESID GROUP3 FROM MEDIAN.TIMESERIESVALUE tv, MEDIAN.TIMESERIES t WHERE tv.TIMESERIESID = t.TIMESERIESID AND t.PARAMETERID IN ( ? ) AND tv.MEASUREMENTID IN ( ? ) AND tv.TIMEVALUE > TO_DATE ('?', 'YYYY.MM.DD HH24:MI:SS') AND tv.TIMEVALUE < TO_DATE ('?', 'YYYY.MM.DD HH24:MI:SS') ORDER BY tv.MEASUREMENTID ,tv.TIMESERIESID ,t.PARAMETERID ,tv.TIMEVALUE
+timeseries_chart_data=SELECT tv.TIMEVALUE XORDINATE, tv.DATAVALUE YORDINATE, t.PARAMETERID GROUP1, tv.MEASUREMENTID GROUP2, tv.TIMESERIESID GROUP3 FROM MEDIAN.TIMESERIESVALUE tv, MEDIAN.TIMESERIES t WHERE tv.TIMESERIESID = t.TIMESERIESID AND t.PARAMETERID IN ( ? ) AND tv.MEASUREMENTID IN ( ? ) AND tv.TIMEVALUE > TO_DATE (?, 'YYYY.MM.DD HH24:MI:SS') AND tv.TIMEVALUE < TO_DATE (?, 'YYYY.MM.DD HH24:MI:SS') ORDER BY tv.MEASUREMENTID ,tv.TIMESERIESID ,t.PARAMETERID ,tv.TIMEVALUE
 
-
-# Zeitserie Mesh
+#############################################
+#############################################
+##########   Zeitserie Mesh    ##############
+#############################################
+#############################################
 
 timeseries_mesh = SELECT OBJECTID KEY, m.NAME VALUE FROM MEDIAN.MESH m order by m.NAME
 timeseries_meshpoint = SELECT FEATUREID KEY, SHAPE VALUE FROM  MEDIAN.MESHPOINT mp , MEDIAN.MESH m WHERE m.OBJECTID = ? AND mp.MESHID = m.MESHID AND KPOSITION = 1 AND rownum < 10 
-timeseries_meshpoint_depth = select mp.FEATUREID KEY, -ml.UPPERZLOCATION || ' - '|| -ml.LOWERZLOCATION as VALUE from MEDIAN.MESHLAYER ml, MEDIAN.MESHPOINT mp where ml.KPOSITION = mp.KPOSITION and ml.MESHID = mp.MESHID and mp.FEATUREID in ( select FEATUREID from MEDIAN.MESHPOINT mp, MEDIAN.MESH m where m.OBJECTID = ? AND mp.MESHID = m.MESHID  AND IPOSITION = (select IPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?) and JPOSITION = (select JPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?)) order by ml.UPPERZLOCATION desc
+timeseries_meshpoint_depth = select mp.FEATUREID KEY, \
+        -ml.UPPERZLOCATION || ' - '|| -ml.LOWERZLOCATION as VALUE \
+    from MEDIAN.MESHLAYER ml, \
+         MEDIAN.MESHPOINT mp \
+    where ml.KPOSITION = mp.KPOSITION and \
+          ml.MESHID = mp.MESHID and \
+          mp.FEATUREID in \
+    ( select FEATUREID \
+      from MEDIAN.MESHPOINT mp, \
+           MEDIAN.MESH m \
+      where m.OBJECTID = ? AND \
+            mp.MESHID = m.MESHID  AND \
+            IPOSITION = (select IPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?) and \
+            JPOSITION = (select JPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?)) \
+    order by ml.UPPERZLOCATION desc
 timeseries_mesh_parameter=SELECT distinct p.PARAMETERID KEY , p.GERMANNAME VALUE  from MEDIAN.PARAMETER p, MEDIAN.MESHSCALARVALUE msc, MEDIAN.MESH m  where m.OBJECTID = ? AND msc.PARTID = m.PARTIDMIN AND msc.PARAMETERID = p.PARAMETERID
 timeseries_mesh_interval=select /*+ parallel(TIMEVALUE,5) */ min(TIMEVALUE) MIN, max(TIMEVALUE) MAX from MEDIAN.MESHSCALARVALUE msc , MEDIAN.MESH m where m.OBJECTID = ?  AND msc.PARTID >= m.PARTIDMIN AND msc.PARTID <= m.PARTIDMAX
-timeseries_mesh_chart_data=select /*+ parallel(timevalue,10) */ msv.TIMEVALUE XORDINATE, msv.DATAVALUE YORDINATE, msv.PARAMETERID GROUP1, msv.FEATUREID GROUP2, mp.FEATUREID GROUP3 from MEDIAN.MESHSCALARVALUE msv , MEDIAN.MESHPOINT mp, MEDIAN.MESH m where (m.OBJECTID = ? AND msv.PARTID >= m.PARTIDMIN AND msv.PARTID <= m.PARTIDMAX ) AND msv.FEATUREID in ( ? ) and msv.PARAMETERID in ( ? ) AND mp.FEATUREID = ? and TIMEVALUE >= to_date('?', 'YYYY.MM.DD HH24:MI:SS') and TIMEVALUE <= to_date('?', 'YYYY.MM.DD HH24:MI:SS') order by msv.FEATUREID, msv.PARAMETERID, msv.TIMEVALUE
+timeseries_mesh_chart_data=select /*+ parallel(timevalue,10) */ msv.TIMEVALUE XORDINATE, msv.DATAVALUE YORDINATE, msv.PARAMETERID GROUP1, msv.FEATUREID GROUP2, mp.FEATUREID GROUP3 from MEDIAN.MESHSCALARVALUE msv , MEDIAN.MESHPOINT mp, MEDIAN.MESH m where (m.OBJECTID = ? AND msv.PARTID >= m.PARTIDMIN AND msv.PARTID <= m.PARTIDMAX ) AND msv.FEATUREID in ( ? ) and msv.PARAMETERID in ( ? ) AND mp.FEATUREID = ? and TIMEVALUE >= to_date(?, 'YYYY.MM.DD HH24:MI:SS') and TIMEVALUE <= to_date(?, 'YYYY.MM.DD HH24:MI:SS') order by msv.FEATUREID, msv.PARAMETERID, msv.TIMEVALUE
 
-# Vertikalprofil
+#############################################
+#############################################
+##########   Vertikalprofil    ##############
+#############################################
+#############################################
 
 verticalprofile_point=SELECT DISTINCT \
            tsp.FEATUREID KEY, \
@@ -62,8 +89,81 @@
           m.MEASUREMENTID = tsv.MEASUREMENTID and \
           m.FEATUREID = ? and \
           ts.PARAMETERID IN ( ? ) AND \
-          tsv.TIMEVALUE IN (TO_DATE ('?', 'YYYY.MM.DD HH24:MI:SS')) \
+          tsv.TIMEVALUE IN (?) \
     ORDER BY tsv.TIMEVALUE , \
              tsv.TIMESERIESID , \
              ts.PARAMETERID , \
              tsv.TIMEVALUE
+             
+#############################################
+#############################################
+########## Vertikalprofil Mesh ##############
+#############################################
+#############################################
+
+verticalprofile_mesh = SELECT OBJECTID KEY, \
+        m.NAME VALUE \
+    FROM MEDIAN.MESH m \
+    order by m.NAME
+    
+verticalprofile_mesh_point = SELECT FEATUREID KEY, \
+        SHAPE VALUE \
+    FROM MEDIAN.MESHPOINT mp , \
+         MEDIAN.MESH m \
+    WHERE m.OBJECTID = ? AND \
+          m.MESHID = mp.MESHID AND \
+          mp.KPOSITION = 1 AND \
+          rownum < 10
+          
+verticalprofile_mesh_parameter=SELECT distinct \
+        p.PARAMETERID KEY , \
+        p.GERMANNAME VALUE \
+    from MEDIAN.PARAMETER p, \
+         MEDIAN.MESHSCALARVALUE msc, \
+         MEDIAN.MESH m  \
+    where m.OBJECTID = ? AND \
+          m.PARTIDMIN = msc.PARTID AND \
+          msc.PARAMETERID = p.PARAMETERID \
+    order by p.GERMANNAME
+          
+verticalprofile_mesh_date= select  distinct \
+        msv.TIMEVALUE KEY, \
+        msv.TIMEVALUE VALUE \
+    from MEDIAN.MESHSCALARVALUE msv , \
+         MEDIAN.MESH m \
+    where m.OBJECTID = ?  AND \
+          msv.PARTID >= m.PARTIDMIN AND \
+          msv.PARTID <= m.PARTIDMAX \
+    order by msv.TIMEVALUE
+
+verticalprofile_mesh_chart_data=select ml.UPPERZLOCATION XORDINATE, \
+           msv.DATAVALUE YORDINATE, \
+           msv.PARAMETERID GROUP1, \
+           msv.TIMEVALUE GROUP2, \
+           1 GROUP3 \
+    from MEDIAN.MESHLAYER ml, \
+         MEDIAN.MESHPOINT mp, \
+         MEDIAN.MESH m, \
+         MEDIAN.MESHSCALARVALUE msv \
+    where msv.FEATUREID = mp. FEATUREID AND \
+          ml.KPOSITION = mp.KPOSITION and \
+          ml.MESHID = mp.MESHID and \
+          m.MESHID = mp.MESHID AND \
+          m.PARTIDMIN <= msv.PARTID AND \
+          m.PARTIDMAX >= msv.PARTID AND \
+          msv.PARAMETERID in (?) AND \
+          msv.TIMEVALUE in (?) AND \
+          m.OBJECTID = ? AND \
+          mp.FEATUREID in \
+            ( select FEATUREID \
+              from MEDIAN.MESHPOINT mp, \
+                   MEDIAN.MESH m \
+              where m.OBJECTID = ? AND \
+                    mp.MESHID = m.MESHID  AND \
+                    IPOSITION = (select IPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?) and \
+                    JPOSITION = (select JPOSITION from MEDIAN.MESHPOINT where FEATUREID = ?)) \
+   order by msv.PARAMETERID, \
+            msv.TIMEVALUE, \
+            ml.UPPERZLOCATION
+            
+  
\ No newline at end of file

http://dive4elements.wald.intevation.org