# HG changeset patch # User Tim Englich # Date 1256220150 0 # Node ID 6e7952fd1744e11b236355bb0697ab2e5b1a633d # Parent 734ac082c8d1e43ab2d01085dbe40f2367943561 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 diff -r 734ac082c8d1 -r 6e7952fd1744 gnv-artifacts/ChangeLog --- 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 + * 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 * doc/conf/conf.xml, doc/conf/products/**/conf_*.xml: Split the Configuration of the ArtifactDatabase in several Configurationfiles. diff -r 734ac082c8d1 -r 6e7952fd1744 gnv-artifacts/doc/conf/products/verticalprofile/conf_instantaneouspoint.xml --- 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 @@ - + verticalprofile_instantaneouspoint_point instantaneouspoint_point false diff -r 734ac082c8d1 -r 6e7952fd1744 gnv-artifacts/doc/conf/queries.properties --- 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 diff -r 734ac082c8d1 -r 6e7952fd1744 gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java --- 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 = new NamedArrayList( 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; }