comparison flys-artifacts/doc/conf/meta-data.xml @ 4900:137ff80f0a01 dc-km-filter

[branch: dc-km-filter] meta-data.xml: Filter wst columns by range.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 29 Jan 2013 15:05:37 +0100
parents 065a78d65007
children c499201a30a3
comparison
equal deleted inserted replaced
4899:8cbea3354ac5 4900:137ff80f0a01
1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage"> 2 <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage">
3 <datacage> 3 <datacage>
4 <dc:macro name="SQL-wst_columns_statement"> 4 <dc:macro name="SQL-wst_columns_statement">
5 <dc:statement> 5 <dc:statement>
6 SELECT wst_columns.id AS prot_column_id, 6 SELECT wst_columns.id AS prot_column_id,
7 wst_columns.name AS prot_column_name, 7 wst_columns.name AS prot_column_name,
8 wst_columns.position AS prot_rel_pos, 8 wst_columns.position AS prot_rel_pos,
9 wst_columns.description AS info, 9 wst_columns.description AS info,
10 wst_ranges.a AS deffrom, 10 wst_ranges.a AS deffrom,
11 wst_ranges.b AS defto 11 wst_ranges.b AS defto
12 FROM wst_columns, wst_ranges 12 FROM wst_columns, wst_ranges
13 WHERE wst_columns.wst_id = ${prot_id} AND wst_ranges.wst_column_id = wst_columns.id 13 WHERE wst_columns.wst_id = ${prot_id} AND wst_ranges.wst_column_id = wst_columns.id
14 ORDER by wst_columns.position 14 AND ( CAST(${startkm} AS DOUBLE PRECISION) BETWEEN wst_ranges.a AND wst_ranges.b
15 </dc:statement> 15 OR CAST(${endkm} AS DOUBLE PRECISION) BETWEEN wst_ranges.a AND wst_ranges.b
16 </dc:macro> 16 OR wst_ranges.a BETWEEN CAST(${startkm} AS DOUBLE PRECISION) AND CAST(${endkm} AS DOUBLE PRECISION)
17 )
18 ORDER by wst_columns.position
19 </dc:statement>
20 </dc:macro>
17 <dc:macro name="load-system"> 21 <dc:macro name="load-system">
18 <dc:context connection="system"> 22 <dc:context connection="system">
19 <dc:statement> 23 <dc:statement>
20 SELECT id AS river_id, name as river_name FROM rivers 24 SELECT id AS river_id, name as river_name FROM rivers
21 WHERE lower(name) LIKE lower(${river}) 25 WHERE lower(name) LIKE lower(${river})

http://dive4elements.wald.intevation.org