comparison artifacts/doc/conf/meta-data.xml @ 8961:8a1c6e2ad48b

Implemented datacage for min/max bedheights. Allow to add min/max bed heights as themes to charts.
author gernotbelger
date Wed, 28 Mar 2018 14:35:01 +0200
parents 3c95b89da5ea
children b98fbd91f64a
comparison
equal deleted inserted replaced
8960:66ce19d2c5f1 8961:8a1c6e2ad48b
259 <dc:call-macro name="flood-map-complete"/> 259 <dc:call-macro name="flood-map-complete"/>
260 </dc:when> 260 </dc:when>
261 261
262 <dc:comment> S-INFO </dc:comment> 262 <dc:comment> S-INFO </dc:comment>
263 <dc:when test="$out = 'sinfo_flowdepth_minfo_heights'"> 263 <dc:when test="$out = 'sinfo_flowdepth_minfo_heights'">
264 <dc:variable name="bed_height_type" expr="''"/>
265 <dc:variable name="bed_height_descr_prefix" expr="''"/>
266 <dc:variable name="bedheight_count" expr="'bedh_height_count'"/>
264 <dc:call-macro name="bed-heights-single"/> 267 <dc:call-macro name="bed-heights-single"/>
265 </dc:when> 268 </dc:when>
266 <dc:when test="$out = 'sinfo_flowdepth_waterlevels'"> 269 <dc:when test="$out = 'sinfo_flowdepth_waterlevels'">
267 <minfo> 270 <minfo>
268 <fixanalysis> 271 <fixanalysis>
425 <dc:call-macro name="flood-map"/> 428 <dc:call-macro name="flood-map"/>
426 </dc:when> 429 </dc:when>
427 <dc:when test="$out = 'map'"> 430 <dc:when test="$out = 'map'">
428 <dc:call-macro name="flood-map"/> 431 <dc:call-macro name="flood-map"/>
429 </dc:when> 432 </dc:when>
430 433
431 <dc:when test="$out = 'sinfo_flowdepth_waterlevels'"> 434 <dc:when test="$out = 'sinfo_flowdepth_waterlevels'">
432 <dc:call-macro name="longitudinal-section-fix-vollmer_q"/> 435 <dc:call-macro name="longitudinal-section-fix-vollmer_q"/>
433 <!-- TODO: 'Frühere Berechnungen//Bezugswasserstände' --> 436 <!-- TODO: 'Frühere Berechnungen//Bezugswasserstände' -->
434 </dc:when> 437 </dc:when>
435 </dc:choose> 438 </dc:choose>
590 <dc:macro name="longitudinal-section-fix-vollmer"> 593 <dc:macro name="longitudinal-section-fix-vollmer">
591 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and 594 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and
592 ($facet_name = 'longitudinal_section.w' or 595 ($facet_name = 'longitudinal_section.w' or
593 $facet_name = 'longitudinal_section.q') 596 $facet_name = 'longitudinal_section.q')
594 "> 597 ">
595 <dc:call-macro name="longitudinal-section-fix-vollmer_macro"/> 598 <dc:call-macro name="longitudinal-section-fix-vollmer_macro"/>
596 </dc:filter> 599 </dc:filter>
597 </dc:macro> 600 </dc:macro>
598 601
599 <dc:macro name="longitudinal-section-fix-vollmer_q"> 602 <dc:macro name="longitudinal-section-fix-vollmer_q">
600 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and $facet_name = 'longitudinal_section.q'"> 603 <dc:filter expr="$a_state = 'state.fix.vollmer.compute' and $facet_name = 'longitudinal_section.q'">
601 <dc:call-macro name="longitudinal-section-fix-vollmer_macro"/> 604 <dc:call-macro name="longitudinal-section-fix-vollmer_macro"/>
602 </dc:filter> 605 </dc:filter>
603 </dc:macro> 606 </dc:macro>
604 607
605 <dc:macro name="longitudinal-section-fix-vollmer_macro"> 608 <dc:macro name="longitudinal-section-fix-vollmer_macro">
606 <dc:if test="dc:has-result()"> 609 <dc:if test="dc:has-result()">
607 <waterlevels_fix_vollmer> 610 <waterlevels_fix_vollmer>
608 <dc:call-macro name="collection-group"> 611 <dc:call-macro name="collection-group">
609 <waterlevels description="{dc:group-key()}"> 612 <waterlevels description="{dc:group-key()}">
610 <dc:for-each> 613 <dc:for-each>
611 <dc:element name="${facet_name}"> 614 <dc:element name="${facet_name}">
612 <dc:attribute name="description" value="${facet_description}"/> 615 <dc:attribute name="description" value="${facet_description}"/>
613 <dc:attribute name="ids" value="${facet_num}"/> 616 <dc:attribute name="ids" value="${facet_num}"/>
614 <dc:attribute name="factory" value="fixanalysis"/> 617 <dc:attribute name="factory" value="fixanalysis"/>
615 <dc:attribute name="target_out" value="${out}"/> 618 <dc:attribute name="target_out" value="${out}"/>
616 <dc:attribute name="artifact-id" value="${a_gid}"/> 619 <dc:attribute name="artifact-id" value="${a_gid}"/>
617 <dc:attribute name="out" value="longitudinal_section"/> 620 <dc:attribute name="out" value="longitudinal_section"/>
618 </dc:element> 621 </dc:element>
619 </dc:for-each> 622 </dc:for-each>
620 </waterlevels> 623 </waterlevels>
621 </dc:call-macro> 624 </dc:call-macro>
622 </waterlevels_fix_vollmer> 625 </waterlevels_fix_vollmer>
623 </dc:if> 626 </dc:if>
624 </dc:macro> 627 </dc:macro>
625 628
626 <dc:macro name="longitudinal-section-fix"> 629 <dc:macro name="longitudinal-section-fix">
627 <dc:filter expr="$out_name = 'fix_longitudinal_section_curve' and 630 <dc:filter expr="$out_name = 'fix_longitudinal_section_curve' and
628 (starts-with($facet_name, 'fix_deviation_ls') or 631 (starts-with($facet_name, 'fix_deviation_ls') or
1599 <flow_velocities> 1602 <flow_velocities>
1600 <dc:call-macro name="flow_velocity_measurements"/> 1603 <dc:call-macro name="flow_velocity_measurements"/>
1601 <dc:call-macro name="flow_velocity_models"/> 1604 <dc:call-macro name="flow_velocity_models"/>
1602 </flow_velocities> 1605 </flow_velocities>
1603 </minfo> 1606 </minfo>
1607
1608 <sinfo>
1609 <bed_heights_minmax>
1610 <dc:call-macro name="minfo-heights-max"/>
1611 <dc:call-macro name="minfo-heights-min"/>
1612 </bed_heights_minmax>
1613 </sinfo>
1604 </dc:macro> 1614 </dc:macro>
1605 1615
1606 <dc:macro name="longitudinal-section-user-prototype"> 1616 <dc:macro name="longitudinal-section-user-prototype">
1607 <dc:comment> WINFO/DIFF/FIX </dc:comment> 1617 <dc:comment> WINFO/DIFF/FIX </dc:comment>
1608 <dc:call-macro name="longitudinal"/> 1618 <dc:call-macro name="longitudinal"/>
1951 <dc:group expr="dc:coalesce($b1year, 'sonstige')"> 1961 <dc:group expr="dc:coalesce($b1year, 'sonstige')">
1952 <minfo-diff name="{dc:group-key()}"> 1962 <minfo-diff name="{dc:group-key()}">
1953 <dc:for-each> 1963 <dc:for-each>
1954 <dc:choose> 1964 <dc:choose>
1955 <dc:when test="dc:group-key() = $b1year"> 1965 <dc:when test="dc:group-key() = $b1year">
1956 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b1id}#bedheight-single-{$b2id}" info="{$b1desc}#{$b2desc}" description="{$b1desc} - {$b2desc}"/> 1966 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b1id}-{$b1desc}#bedheight-single-{$b2id}-{$b2desc}" info="{$b1desc}#{$b2desc}" description="{$b1desc} - {$b2desc}"/>
1957 </dc:when> 1967 </dc:when>
1958 <dc:when test="dc:group-key() = 'sonstige'"> 1968 <dc:when test="dc:group-key() = 'sonstige'">
1959 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b1id}#bedheight-single-{$b2id}" info="{$b1desc}#{$b2desc}" description="{$b1desc} - {$b2desc}"/> 1969 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b1id}-{$b1desc}#bedheight-single-{$b2id}-{$b2desc}" info="{$b1desc}#{$b2desc}" description="{$b1desc} - {$b2desc}"/>
1960 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b2id}#bedheight-single-{$b1id}" info="{$b2desc}#{$b1desc}" description="{$b2desc} - {$b1desc}"/> 1970 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$b2id}-{$b1desc}#bedheight-single-{$b1id}-{$b2desc}" info="{$b2desc}#{$b1desc}" description="{$b2desc} - {$b1desc}"/>
1961 </dc:when> 1971 </dc:when>
1962 </dc:choose> 1972 </dc:choose>
1963 </dc:for-each> 1973 </dc:for-each>
1964 </minfo-diff> 1974 </minfo-diff>
1965 </dc:group> 1975 </dc:group>
1966 </dc:macro> 1976 </dc:macro>
1967 1977
1968 <dc:macro name="minfo-heights"> 1978 <dc:macro name="minfo-heights">
1969 <bedheights> 1979 <bedheights>
1980 <dc:variable name="bed_height_type" expr="''">
1981 <!-- REMARK: empty type for the former, 'normal' bed height -->
1982 </dc:variable>
1983 <dc:variable name="bed_height_descr_prefix" expr="''"/>
1984 <dc:variable name="bedheight_count" expr="'bedh_height_count'"/>
1970 <dc:call-macro name="bed-heights-single"/> 1985 <dc:call-macro name="bed-heights-single"/>
1971 <dc:call-macro name="bed-heights-epoch"/> 1986 <dc:call-macro name="bed-heights-epoch"/>
1972 </bedheights> 1987 </bedheights>
1973 </dc:macro> 1988 </dc:macro>
1974 1989
1990 <dc:macro name="minfo-heights-max">
1991 <bedheights_max>
1992 <dc:variable name="bed_height_type" expr="'Max'"/>
1993 <dc:variable name="bed_height_descr_prefix" expr="'KL-'"/>
1994 <dc:variable name="bedheight_count" expr="'bedh_max_count'"/>
1995 <dc:call-macro name="bed-heights-single"/>
1996 <dc:call-macro name="bed-heights-epoch"/>
1997 </bedheights_max>
1998 </dc:macro>
1999
2000 <dc:macro name="minfo-heights-min">
2001 <bedheights_min>
2002 <dc:variable name="bed_height_type" expr="'Min'"/>
2003 <dc:variable name="bed_height_descr_prefix" expr="'TW-'"/>
2004 <dc:variable name="bedheight_count" expr="'bedh_min_count'"/>
2005 <dc:call-macro name="bed-heights-single"/>
2006 <dc:call-macro name="bed-heights-epoch"/>
2007 </bedheights_min>
2008 </dc:macro>
2009
1975 <dc:macro name="bed-heights-factory"> 2010 <dc:macro name="bed-heights-factory">
1976 <dc:for-each> 2011 <dc:for-each>
1977 <height factory="bedheight" target_out="{$out}" ids="bedheight-single-{$bedh_id}-{$bedh_year}" info="{$info}" description="{$bedh_descr}"/> 2012 <height factory="bedheight" target_out="{$out}" ids="bedheight-single{$bed_height_type}-{$bedh_id}-{$bedh_year}-{$bed_height_descr_prefix}{$bedh_descr}" info="{$info}" description="{$bed_height_descr_prefix}{$bedh_descr}"/>
1978 </dc:for-each> 2013 </dc:for-each>
1979 </dc:macro> 2014 </dc:macro>
1980 2015
1981 <dc:macro name="bed-heights-single"> 2016 <dc:macro name="bed-heights-single">
1982 <single> 2017 <single>
1983 <dc:context> 2018 <dc:context>
1984 <dc:call-macro name="bed-heights-statement"/> 2019 <dc:call-macro name="bed-heights-statement"/>
1985 <dc:filter expr="not(contains($bedh_descr, 'Epoche'))"> 2020 <dc:filter expr="not(contains($bedh_descr, 'Epoche'))">
1986 <dc:if test="dc:has-result()"> 2021 <dc:filter expr="dc:column($bedheight_count) > 0">
1987 <dc:group expr="dc:coalesce($bedh_year, 'sonstige')"> 2022 <dc:if test="dc:has-result()">
1988 <heights name="{dc:group-key()}"> 2023 <dc:group expr="dc:coalesce($bedh_year, 'sonstige')">
1989 <dc:call-macro name="bed-heights-factory"/> 2024 <heights name="{dc:group-key()}">
1990 </heights> 2025 <dc:call-macro name="bed-heights-factory"/>
1991 </dc:group> 2026 </heights>
1992 </dc:if> 2027 </dc:group>
2028 </dc:if>
2029 </dc:filter>
1993 </dc:filter> 2030 </dc:filter>
1994 </dc:context> 2031 </dc:context>
1995 </single> 2032 </single>
1996 </dc:macro> 2033 </dc:macro>
1997 2034
1998 <dc:macro name="bed-heights-epoch"> 2035 <dc:macro name="bed-heights-epoch">
1999 <epoch> 2036 <epoch>
2000 <dc:context> 2037 <dc:context>
2001 <dc:call-macro name="bed-heights-statement"/> 2038 <dc:call-macro name="bed-heights-statement"/>
2002 <dc:filter expr="contains($bedh_descr, 'Epoche')"> 2039 <dc:filter expr="contains($bedh_descr, 'Epoche')">
2003 <dc:call-macro name="bed-heights-factory"/> 2040 <dc:filter expr="dc:column($bedheight_count) > 0">
2041 <dc:call-macro name="bed-heights-factory"/>
2042 </dc:filter>
2004 </dc:filter> 2043 </dc:filter>
2005 </dc:context> 2044 </dc:context>
2006 </epoch> 2045 </epoch>
2007 </dc:macro> 2046 </dc:macro>
2008 2047
2009 <dc:macro name="sounding-width-factory"> 2048 <dc:macro name="sounding-width-factory">
2010 <dc:for-each> 2049 <dc:for-each>
2011 <height factory="bedheight" target_out="{$out}" ids="bedheight-soundings-{$bedh_id}-{$bedh_year}" info="{$info}" description="{$bedh_descr}"/> 2050 <height factory="bedheight" target_out="{$out}" ids="bedheight-soundings-{$bedh_id}-{$bedh_year}-{$bedh_descr}" info="{$info}" description="{$bedh_descr}"/>
2012 </dc:for-each> 2051 </dc:for-each>
2013 </dc:macro> 2052 </dc:macro>
2014 2053
2015 <dc:macro name="sounding-width"> 2054 <dc:macro name="sounding-width">
2016 <dc:context> 2055 <dc:context>
2032 </dc:context> 2071 </dc:context>
2033 </dc:macro> 2072 </dc:macro>
2034 2073
2035 <dc:macro name="bed-heights-statement"> 2074 <dc:macro name="bed-heights-statement">
2036 <dc:statement> 2075 <dc:statement>
2037 SELECT bhs.id AS bedh_id, 2076 SELECT bhs.id AS bedh_id,
2038 bhs.year AS bedh_year, 2077 bhs.year AS bedh_year,
2039 bhs.description AS bedh_descr, 2078 bhs.description AS bedh_descr,
2040 bhs.description || '&lt;BR&gt;Jahr: ' || bhs.year || 2079 bhs.description || '&lt;BR&gt;Jahr: ' || bhs.year ||
2041 '&lt;BR&gt;Aufnahmeart: ' || bht.name || 2080 '&lt;BR&gt;Aufnahmeart: ' || bht.name ||
2042 '&lt;BR&gt;Lagesystem: ' || ls.name || 2081 '&lt;BR&gt;Lagesystem: ' || ls.name ||
2043 '&lt;BR&gt;Höhensystem: ' || cur_em.name || 2082 '&lt;BR&gt;Höhensystem: ' || cur_em.name ||
2044 '&lt;BR&gt;ursprüngliches Höhensystem: ' || old_em.name || 2083 '&lt;BR&gt;ursprüngliches Höhensystem: ' || old_em.name ||
2045 '&lt;BR&gt;Strecke: ' || round(r.a, 1) || '-' || round(r.b, 1) || 2084 '&lt;BR&gt;Strecke: ' || round(r.a, 1) || '-' || round(r.b, 1) ||
2046 '&lt;BR&gt;Auswerter: ' || bhs.evaluation_by AS info 2085 '&lt;BR&gt;Auswerter: ' || bhs.evaluation_by AS info,
2047 FROM bed_height bhs 2086 bhv.height_count AS bedh_height_count,
2048 JOIN bed_height_type bht ON bht.id = 2087 bhv.min_count AS bedh_min_count,
2049 bhs.type_id 2088 bhv.max_count AS bedh_max_count
2050 JOIN location_system ls ON ls.id = location_system_id 2089 FROM bed_height bhs
2051 JOIN elevation_model cur_em ON cur_em.id = cur_elevation_model_id 2090 JOIN bed_height_type bht ON bht.id = bhs.type_id
2052 LEFT JOIN elevation_model old_em 2091 JOIN location_system ls ON ls.id = location_system_id
2053 ON old_em.id = old_elevation_model_id 2092 JOIN elevation_model cur_em ON cur_em.id = cur_elevation_model_id
2054 LEFT JOIN ranges r ON r.id = range_id 2093 LEFT JOIN elevation_model old_em
2055 WHERE bhs.river_id = ${river_id} 2094 ON old_em.id = old_elevation_model_id
2095 LEFT JOIN ranges r ON r.id = range_id
2096 LEFT JOIN (SELECT bed_height_id, COUNT(height) AS height_count, COUNT(min_height) AS min_count, COUNT(max_height) AS max_count
2097 FROM bed_height_values GROUP BY bed_height_id
2098 ) bhv ON bhs.id = bhv.bed_height_id
2099 WHERE bhs.river_id = ${river_id}
2056 </dc:statement> 2100 </dc:statement>
2057 </dc:macro> 2101 </dc:macro>
2058 2102
2059 <!-- flow velocity --> 2103 <!-- flow velocity -->
2060 <dc:macro name="flow_velocity_models"> 2104 <dc:macro name="flow_velocity_models">

http://dive4elements.wald.intevation.org