Mercurial > dive4elements > river
comparison artifacts/doc/conf/meta-data.xml @ 7405:350057df635b
(issue965) Use new datacage magic to have year filtering for bedheights
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 21 Oct 2013 18:57:30 +0200 |
parents | 93ae1aa8ade9 |
children | 91ff42699f58 |
comparison
equal
deleted
inserted
replaced
7404:6599ee317069 | 7405:350057df635b |
---|---|
1666 <background factory="wmsbackground" ids="{$river_id}" target_out="{$out}" /> | 1666 <background factory="wmsbackground" ids="{$river_id}" target_out="{$out}" /> |
1667 </rastermap> | 1667 </rastermap> |
1668 </dc:macro> | 1668 </dc:macro> |
1669 | 1669 |
1670 <dc:macro name="minfo-heights"> | 1670 <dc:macro name="minfo-heights"> |
1671 <dc:variable name="year_from" expr=" | |
1672 dc:min-number( | |
1673 dc:find-all( | |
1674 '\d{4}', | |
1675 dc:replace-all( | |
1676 $diffids, '[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}', '')))" | |
1677 type="number"/> | |
1678 <dc:variable name="year_to" expr=" | |
1679 dc:max-number( | |
1680 dc:find-all( | |
1681 '\d{4}', | |
1682 dc:replace-all( | |
1683 $diffids, '[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}', '')))" | |
1684 type="number"/> | |
1671 <bedheights> | 1685 <bedheights> |
1672 <dc:call-macro name="bed-heights-single"/> | 1686 <dc:call-macro name="bed-heights-single"/> |
1673 <dc:call-macro name="bed-heights-epoch"/> | 1687 <dc:call-macro name="bed-heights-epoch"/> |
1674 </bedheights> | 1688 </bedheights> |
1675 </dc:macro> | 1689 </dc:macro> |
1683 bhs.description AS bedh_descr, | 1697 bhs.description AS bedh_descr, |
1684 bht.name AS type_name | 1698 bht.name AS type_name |
1685 FROM bed_height_single bhs | 1699 FROM bed_height_single bhs |
1686 JOIN bed_height_type bht ON bht.id = bhs.type_id | 1700 JOIN bed_height_type bht ON bht.id = bhs.type_id |
1687 WHERE bhs.river_id = ${river_id} | 1701 WHERE bhs.river_id = ${river_id} |
1688 AND lower(bhs.description) NOT LIKE '%epoch%' | 1702 AND lower(bhs.description) NOT LIKE '%epoch%' |
1703 AND bhs.year BETWEEN ${year_from} AND ${year_to} | |
1689 </dc:statement> | 1704 </dc:statement> |
1690 <dc:if test="dc:has-result()"> | 1705 <dc:if test="dc:has-result()"> |
1691 <dc:group expr="$bedh_year"> | 1706 <dc:group expr="$bedh_year"> |
1692 <cross-sections name="{dc:group-key()}"> | 1707 <cross-sections name="{dc:group-key()}"> |
1693 <dc:for-each> | 1708 <dc:for-each> |
1712 year AS bedh_year, | 1727 year AS bedh_year, |
1713 description AS bedh_descr | 1728 description AS bedh_descr |
1714 FROM bed_height_single | 1729 FROM bed_height_single |
1715 WHERE river_id = ${river_id} | 1730 WHERE river_id = ${river_id} |
1716 AND lower(description) LIKE '%epoch%' | 1731 AND lower(description) LIKE '%epoch%' |
1732 AND year BETWEEN ${year_from} AND ${year_to} | |
1717 </dc:statement> | 1733 </dc:statement> |
1718 <dc:for-each> | 1734 <dc:for-each> |
1719 <height factory="bedheight" target_out="{$out}" | 1735 <height factory="bedheight" target_out="{$out}" |
1720 ids="bedheight-single-{$bedh_id}-{$bedh_year}" | 1736 ids="bedheight-single-{$bedh_id}-{$bedh_year}" |
1721 description="{$bedh_descr}"/> | 1737 description="{$bedh_descr}"/> |