comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java @ 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 72bd41ba548d
children d87347142702
comparison
equal deleted inserted replaced
204:734ac082c8d1 205:6e7952fd1744
101 String valueid) { 101 String valueid) {
102 Iterator<Result> rit = result.iterator(); 102 Iterator<Result> rit = result.iterator();
103 NamedCollection<KeyValueDescibeData> keyValueDescibeData = new NamedArrayList<KeyValueDescibeData>( 103 NamedCollection<KeyValueDescibeData> keyValueDescibeData = new NamedArrayList<KeyValueDescibeData>(
104 this.dataName, result.size()); 104 this.dataName, result.size());
105 keyValueDescibeData.setMultiSelect(this.dataMultiSelect); 105 keyValueDescibeData.setMultiSelect(this.dataMultiSelect);
106 String prevKey = null;
106 while (rit.hasNext()) { 107 while (rit.hasNext()) {
107 Result resultValue = rit.next(); 108 Result resultValue = rit.next();
108 keyValueDescibeData.add(new DefaultKeyValueDescribeData(resultValue 109 String key = resultValue.getString(keyid);
109 .getString(keyid), this.convert2DisplayCoordinate(resultValue.getString(valueid)))); 110 if(prevKey == null || !prevKey.equals(key)){ // müssen wir so machen, da die sde kein select distinct auf layern zulässt.
111 String geomString = this.convert2DisplayCoordinate(resultValue.getString(valueid));
112 String value = geomString;
113 if (resultValue.getResultDescriptor().getColumnIndex("VALUE") > 0){
114 value = resultValue.getString("VALUE") + " - "+value;
115 }
116
117
118 keyValueDescibeData.add(new DefaultKeyValueDescribeData(key,value ));
119 }
120 prevKey = key;
110 } 121 }
111 return keyValueDescibeData; 122 return keyValueDescibeData;
112 } 123 }
113 124
114 protected String convert2DisplayCoordinate(String wkt){ 125 protected String convert2DisplayCoordinate(String wkt){

http://dive4elements.wald.intevation.org