comparison artifacts/doc/conf/meta-data.xml @ 7672:691d15750513

(issue1474) Change order of measurement stations
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 06 Dec 2013 16:47:02 +0100
parents a6363e080e2c
children 7e4c5bd86227
comparison
equal deleted inserted replaced
7671:aaefcf391d82 7672:691d15750513
1913 SELECT sq.description AS description, 1913 SELECT sq.description AS description,
1914 ti.start_time AS start_time, 1914 ti.start_time AS start_time,
1915 ti.stop_time AS stop_time, 1915 ti.stop_time AS stop_time,
1916 ms.name AS station_name, 1916 ms.name AS station_name,
1917 lower(sqv.parameter) AS parameter, 1917 lower(sqv.parameter) AS parameter,
1918 sqv.id AS sqvid 1918 sqv.id AS sqvid,
1919 ra.a AS station_km
1919 FROM sq_relation sq 1920 FROM sq_relation sq
1920 JOIN time_intervals ti ON ti.id = sq.time_interval_id 1921 JOIN time_intervals ti ON ti.id = sq.time_interval_id
1921 JOIN rivers r ON r.id = sq.river_id 1922 JOIN rivers r ON r.id = sq.river_id
1922 JOIN sq_relation_value sqv ON sqv.sq_relation_id = sq.id 1923 JOIN sq_relation_value sqv ON sqv.sq_relation_id = sq.id
1923 JOIN measurement_station ms ON sqv.measurement_station_id = ms.id 1924 JOIN measurement_station ms ON sqv.measurement_station_id = ms.id
1925 JOIN ranges ra ON ms.range_id = ra.id
1924 WHERE r.id = ${river_id} 1926 WHERE r.id = ${river_id}
1925 ORDER BY start_time, stop_time 1927 ORDER BY station_km, start_time, stop_time
1926 </dc:statement> 1928 </dc:statement>
1927 <dc:if test="dc:has-result()"> 1929 <dc:if test="dc:has-result()">
1928 <sq_relations> 1930 <sq_relations>
1929 <dc:filter expr="$out = concat('sq_relation_', $parameter)"> 1931 <dc:filter expr="$out = concat('sq_relation_', $parameter)">
1930 <dc:group expr="$station_name"> 1932 <dc:group expr="$station_km" type="number">
1931 <station description="{dc:group-key()}"> 1933 <dc:group expr="concat('km ', $station_km, ': ', $station_name)">
1932 <dc:for-each> 1934 <station description="{dc:group-key()}">
1933 <dc:variable name="combined_desc" expr="concat(dc:date-format('yyyy', $start_time), ' bis ', dc:date-format('yyyy', $stop_time))"/> 1935 <dc:for-each>
1934 <sqvalue factory="staticsqrelation" target_out="{$out}" 1936 <dc:variable name="combined_desc" expr="concat(dc:date-format('yyyy', $start_time), ' bis ', dc:date-format('yyyy', $stop_time))"/>
1935 ids="{$sqvid};{$station_name}: {$combined_desc}" description="{$combined_desc}"/> 1937 <sqvalue factory="staticsqrelation" target_out="{$out}"
1936 </dc:for-each> 1938 ids="{$sqvid};{$station_name}: {$combined_desc}" description="{$combined_desc}"/>
1937 </station> 1939 </dc:for-each>
1940 </station>
1941 </dc:group>
1938 </dc:group> 1942 </dc:group>
1939 </dc:filter> 1943 </dc:filter>
1940 </sq_relations> 1944 </sq_relations>
1941 </dc:if> 1945 </dc:if>
1942 </dc:context> 1946 </dc:context>

http://dive4elements.wald.intevation.org