changeset 205:6e7952fd1744

Added the support to Display the Time and the position of an Measurement in an VerticalProfile of Type Instantaneous Point gnv-artifacts/trunk@261 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 22 Oct 2009 14:02:30 +0000
parents 734ac082c8d1
children 01ac348ac4a4
files gnv-artifacts/ChangeLog gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml gnv-artifacts/doc/conf/queries.properties gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java
diffstat 4 files changed, 39 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/gnv-artifacts/ChangeLog	Thu Oct 22 08:50:21 2009 +0000
+++ b/gnv-artifacts/ChangeLog	Thu Oct 22 14:02:30 2009 +0000
@@ -1,5 +1,13 @@
 2009-10-22  Tim Englich  <tim.englich@intevation.de>
 
+	* src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java (extractKVP): 
+	  Added the possiblility to fetch an further Column with the alias Value to display it 
+	  together with the Coordinatevalues
+	* doc/conf/queries.properties: 
+	  Added the Coordinates to an Measuementpoint to display it.
+	* doc/conf/products/verticalprofile/conf_instantaneouspoint.xml:
+	  Change TransitionType for displaying Coordinatevalues aditionaly to the Time of an Measurement 
+2009-10-22  Tim Englich  <tim.englich@intevation.de>
 	* doc/conf/conf.xml,
 	  doc/conf/products/**/conf_*.xml:
 	  Split the Configuration of the ArtifactDatabase in several Configurationfiles.
--- a/gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml	Thu Oct 22 08:50:21 2009 +0000
+++ b/gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml	Thu Oct 22 14:02:30 2009 +0000
@@ -13,7 +13,7 @@
               <inputvalue name="fisname" type="String" multiselect="false" usedinquery="0"/>
          </inputvalues>
      </transition>
-     <transition id="verticalprofile_instantaneouspoint_point" description="verticalprofile_instantaneouspoint_point" transition="de.intevation.gnv.transition.DefaultTransition">
+     <transition id="verticalprofile_instantaneouspoint_point" description="verticalprofile_instantaneouspoint_point" transition="de.intevation.gnv.transition.CoordinateSelectionTransition">
          <queryID>verticalprofile_instantaneouspoint_point</queryID>
          <dataname>instantaneouspoint_point</dataname>
          <data-multiselect>false</data-multiselect>
--- a/gnv-artifacts/doc/conf/queries.properties	Thu Oct 22 08:50:21 2009 +0000
+++ b/gnv-artifacts/doc/conf/queries.properties	Thu Oct 22 14:02:30 2009 +0000
@@ -313,17 +313,19 @@
           M.SOURCEID= ? \
     ORDER BY S.DESCRIPTION
     
-verticalprofile_instantaneouspoint_point = SELECT DISTINCT \
-        I.FEATUREID KEY, \
-        to_char(I.TIMEVALUE,'DD.MM.YYYY HH24:MI') || ' - '|| I.SHAPE VALUE, \
-        I.TIMEVALUE \
-    FROM MEDIAN.INSTANTANEOUSPOINT I, \
+verticalprofile_instantaneouspoint_point = SELECT \
+        MEDIAN.INSTANTANEOUSPOINT.FEATUREID, \
+        to_char(MEDIAN.INSTANTANEOUSPOINT.TIMEVALUE,'DD.MM.YYYY HH24:MI') VALUE, \
+        MEDIAN.INSTANTANEOUSPOINT.TIMEVALUE, \
+         ST_ASTEXT(SHAPE) \
+    FROM MEDIAN.INSTANTANEOUSPOINT, \
          MEDIAN.MEASUREMENT M \
-    WHERE I.SERIESID = ? AND \
-          I.POINTSPEC = 4 AND \
-          I.FEATUREID = M.FEATUREID AND \
+    WHERE MEDIAN.INSTANTANEOUSPOINT.SERIESID = ? AND \
+          MEDIAN.INSTANTANEOUSPOINT.POINTSPEC = 4 AND \
+          MEDIAN.INSTANTANEOUSPOINT.FEATUREID = M.FEATUREID AND \
           M.SOURCEID = ? \
-    ORDER BY I.TIMEVALUE
+    ORDER BY MEDIAN.INSTANTANEOUSPOINT.FEATUREID, \
+             MEDIAN.INSTANTANEOUSPOINT.TIMEVALUE
 
 verticalprofile_instantaneouspoint_parameter = SELECT DISTINCT \
         P.PARAMETERID KEY , \
@@ -388,8 +390,7 @@
           S.SURVEYID  = I.SURVEYID AND \
           I.FEATUREID =  M.FEATUREID AND \
           C.VEHICLEID  = ? AND \
-          M.SOURCEID = ? AND \
-          C.NAME IS NOT NULL \
+          M.SOURCEID = ? \
     ORDER BY C.NAME
 horizontalprofile_instantaneouspoint_track= SELECT \
         T.TRACKID KEY , \
@@ -544,9 +545,8 @@
               where m.OBJECTID = ? AND \
                     mp.MESHID = m.MESHID  AND \
                     ? = (select ? from MEDIAN.MESHPOINT where FEATUREID = ?)) \
-   order by msv.TIMEVALUE, \
-            msv.PARAMETERID, \
-            MEDIAN.MESHPOINT.JPOSITION , \
-            MEDIAN.MESHPOINT.IPOSITION, \
-            MEDIAN.MESHPOINT.KPOSITION
-          
\ No newline at end of file
+    order by msv.TIMEVALUE, \
+             msv.PARAMETERID, \
+             MEDIAN.MESHPOINT.JPOSITION , \
+             MEDIAN.MESHPOINT.IPOSITION, \
+             MEDIAN.MESHPOINT.KPOSITION
\ No newline at end of file
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java	Thu Oct 22 08:50:21 2009 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java	Thu Oct 22 14:02:30 2009 +0000
@@ -103,10 +103,21 @@
         NamedCollection<KeyValueDescibeData> keyValueDescibeData = new NamedArrayList<KeyValueDescibeData>(
         this.dataName, result.size());
         keyValueDescibeData.setMultiSelect(this.dataMultiSelect);
+        String prevKey = null;
         while (rit.hasNext()) {
             Result resultValue = rit.next();
-            keyValueDescibeData.add(new DefaultKeyValueDescribeData(resultValue
-            .getString(keyid), this.convert2DisplayCoordinate(resultValue.getString(valueid))));
+            String key = resultValue.getString(keyid);
+            if(prevKey == null || !prevKey.equals(key)){ // müssen wir so machen, da die sde kein select distinct auf layern zulässt.
+                String geomString = this.convert2DisplayCoordinate(resultValue.getString(valueid));
+                String value = geomString;
+                if (resultValue.getResultDescriptor().getColumnIndex("VALUE") > 0){
+                    value = resultValue.getString("VALUE") + " - "+value;
+                }
+                
+                
+                keyValueDescibeData.add(new DefaultKeyValueDescribeData(key,value ));
+            }
+            prevKey = key;
         }
         return keyValueDescibeData;
     }

http://dive4elements.wald.intevation.org