comparison artifacts/doc/conf/meta-data.xml @ 8419:d7d74392cc46

Do not filter bed heights by year in datacage for optional data (plus some cleanup).
author Tom Gottfried <tom@intevation.de>
date Fri, 17 Oct 2014 11:44:01 +0200
parents 6399ebc6fce9
children f1bc081210ea
comparison
equal deleted inserted replaced
8418:536a1c0c8a81 8419:d7d74392cc46
1794 <rastermap> 1794 <rastermap>
1795 <background factory="wmsbackground" ids="{$river_id}" target_out="{$out}" /> 1795 <background factory="wmsbackground" ids="{$river_id}" target_out="{$out}" />
1796 </rastermap> 1796 </rastermap>
1797 </dc:macro> 1797 </dc:macro>
1798 1798
1799 <!-- bed heights -->
1799 <dc:macro name="minfo-heights-diff"> 1800 <dc:macro name="minfo-heights-diff">
1800 <dc:call-macro name="minfo-heights-years"> 1801 <dc:call-macro name="minfo-heights-years">
1801 <dc:context> 1802 <dc:context>
1802 <dc:statement> 1803 <dc:statement>
1803 WITH sta 1804 WITH sta
1879 </dc:for-each> 1880 </dc:for-each>
1880 </minfo-diff> 1881 </minfo-diff>
1881 </dc:group> 1882 </dc:group>
1882 </dc:macro> 1883 </dc:macro>
1883 1884
1884 <dc:macro name="minfo-heights">
1885 <dc:call-macro name="minfo-heights-years">
1886 <bedheights>
1887 <dc:call-macro name="bed-heights-single"/>
1888 <dc:call-macro name="bed-heights-epoch"/>
1889 </bedheights>
1890 </dc:call-macro>
1891 </dc:macro>
1892
1893 <dc:macro name="minfo-heights-years"> 1885 <dc:macro name="minfo-heights-years">
1894 <dc:comment> 1886 <dc:comment>
1895 The input here is a list differenc ids noted in the 1887 The input here is a list differenc ids noted in the
1896 form: 1888 form:
1897 [2726deb8-e71f-4acc-bc57-c7ae6062df2e;bedheight;0;FP-Mai2006vHW]# 1889 [2726deb8-e71f-4acc-bc57-c7ae6062df2e;bedheight;0;FP-Mai2006vHW]#
1938 </dc:otherwise> 1930 </dc:otherwise>
1939 </dc:choose> 1931 </dc:choose>
1940 <dc:macro-body/> 1932 <dc:macro-body/>
1941 </dc:macro> 1933 </dc:macro>
1942 1934
1935 <dc:macro name="minfo-heights">
1936 <bedheights>
1937 <dc:call-macro name="bed-heights-single"/>
1938 <dc:call-macro name="bed-heights-epoch"/>
1939 </bedheights>
1940 </dc:macro>
1941
1942 <dc:macro name="bed-heights-factory">
1943 <dc:for-each>
1944 <height factory="bedheight"
1945 target_out="{$out}"
1946 ids="bedheight-single-{$bedh_id}-{$bedh_year}"
1947 info="{$info}"
1948 description="{$bedh_descr}"/>
1949 </dc:for-each>
1950 </dc:macro>
1951
1952 <dc:macro name="bed-heights-single">
1953 <single>
1954 <dc:context>
1955 <dc:call-macro name="bed-heights-statement"/>
1956 <dc:filter expr="not(contains($bedh_descr, 'Epoche'))">
1957 <dc:if test="dc:has-result()">
1958 <dc:group expr="dc:coalesce($bedh_year, 'sonstige')">
1959 <heights name="{dc:group-key()}">
1960 <dc:call-macro name="bed-heights-factory"/>
1961 </heights>
1962 </dc:group>
1963 </dc:if>
1964 </dc:filter>
1965 </dc:context>
1966 </single>
1967 </dc:macro>
1968
1969 <dc:macro name="bed-heights-epoch">
1970 <epoch>
1971 <dc:context>
1972 <dc:call-macro name="bed-heights-statement"/>
1973 <dc:filter expr="contains($bedh_descr, 'Epoche')">
1974 <dc:call-macro name="bed-heights-factory"/>
1975 </dc:filter>
1976 </dc:context>
1977 </epoch>
1978 </dc:macro>
1979
1943 <dc:macro name="bed-heights-statement"> 1980 <dc:macro name="bed-heights-statement">
1944 <dc:statement> 1981 <dc:statement>
1945 SELECT bhs.id AS bedh_id, 1982 SELECT bhs.id AS bedh_id,
1946 bhs.year AS bedh_year, 1983 bhs.year AS bedh_year,
1947 bhs.description AS bedh_descr, 1984 bhs.description AS bedh_descr,
1948 bhs.description || '&lt;BR&gt;Jahr: ' || bhs.year || 1985 bhs.description || '&lt;BR&gt;Jahr: ' || bhs.year ||
1949 '&lt;BR&gt;Aufnahmeart: ' || bht.name || 1986 '&lt;BR&gt;Aufnahmeart: ' || bht.name ||
1950 '&lt;BR&gt;Lagesystem: ' || ls.name || 1987 '&lt;BR&gt;Lagesystem: ' || ls.name ||
1957 JOIN location_system ls ON ls.id = location_system_id 1994 JOIN location_system ls ON ls.id = location_system_id
1958 JOIN elevation_model cur_em ON cur_em.id = cur_elevation_model_id 1995 JOIN elevation_model cur_em ON cur_em.id = cur_elevation_model_id
1959 JOIN elevation_model old_em ON old_em.id = old_elevation_model_id 1996 JOIN elevation_model old_em ON old_em.id = old_elevation_model_id
1960 JOIN ranges r ON r.id = range_id 1997 JOIN ranges r ON r.id = range_id
1961 WHERE bhs.river_id = ${river_id} 1998 WHERE bhs.river_id = ${river_id}
1962 AND bhs.year BETWEEN ${year_from} AND ${year_to}
1963 </dc:statement> 1999 </dc:statement>
1964 </dc:macro> 2000 </dc:macro>
1965 2001
1966 <dc:macro name="bed-heights-factory"> 2002 <!-- flow velocity -->
1967 <dc:for-each>
1968 <height factory="bedheight"
1969 target_out="{$out}"
1970 ids="bedheight-single-{$bedh_id}-{$bedh_year}"
1971 info="{$info}"
1972 description="{$bedh_descr}"/>
1973 </dc:for-each>
1974 </dc:macro>
1975
1976 <dc:macro name="bed-heights-single">
1977 <single>
1978 <dc:context>
1979 <dc:call-macro name="bed-heights-statement"/>
1980 <dc:filter expr="not(contains($bedh_descr, 'Epoche'))">
1981 <dc:if test="dc:has-result()">
1982 <dc:group expr="$bedh_year">
1983 <cross-sections name="{dc:group-key()}">
1984 <dc:call-macro name="bed-heights-factory"/>
1985 </cross-sections>
1986 </dc:group>
1987 </dc:if>
1988 </dc:filter>
1989 </dc:context>
1990 </single>
1991 </dc:macro>
1992
1993 <dc:macro name="bed-heights-epoch">
1994 <epoch>
1995 <dc:context>
1996 <dc:call-macro name="bed-heights-statement"/>
1997 <dc:filter expr="contains($bedh_descr, 'Epoche')">
1998 <dc:call-macro name="bed-heights-factory"/>
1999 </dc:filter>
2000 </dc:context>
2001 </epoch>
2002 </dc:macro>
2003
2004 <dc:macro name="flow_velocity_models"> 2003 <dc:macro name="flow_velocity_models">
2005 <dc:context> 2004 <dc:context>
2006 <dc:statement> 2005 <dc:statement>
2007 SELECT fvm.id AS fvmid, 2006 SELECT fvm.id AS fvmid,
2008 fvm.description AS fvmd, 2007 fvm.description AS fvmd,

http://dive4elements.wald.intevation.org