sascha@1046: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> sascha@1046: <dc:template xmlns:dc="http://www.intevation.org/2011/Datacage"> sascha@1046: <datacage> rrenkert@5015: <dc:comment> rrenkert@5015: Statement to load data from wsts. rrenkert@5015: </dc:comment> rrenkert@5015: <dc:macro name="SQL-wst_columns_statement"> felix@4894: <dc:statement> felix@4894: SELECT wst_columns.id AS prot_column_id, felix@4894: wst_columns.name AS prot_column_name, felix@4894: wst_columns.position AS prot_rel_pos, felix@4895: wst_columns.description AS info, felix@4895: wst_ranges.a AS deffrom, felix@4895: wst_ranges.b AS defto felix@4895: FROM wst_columns, wst_ranges rrenkert@5015: WHERE wst_columns.wst_id = ${prot_id} rrenkert@5015: AND wst_ranges.wst_column_id = wst_columns.id rrenkert@5015: AND (${fromkm} BETWEEN wst_ranges.a AND wst_ranges.b rrenkert@5015: OR ${tokm} BETWEEN wst_ranges.a AND wst_ranges.b rrenkert@5015: OR wst_ranges.a BETWEEN ${fromkm} AND ${tokm} rrenkert@5015: OR wst_ranges.b BETWEEN ${fromkm} AND ${tokm}) felix@4894: ORDER by wst_columns.position felix@4894: </dc:statement> rrenkert@5015: </dc:macro> rrenkert@5015: rrenkert@5015: <dc:comment> rrenkert@5015: Load user specific distance information from artifact. rrenkert@5015: </dc:comment> rrenkert@5015: <dc:macro name="user-range"> rrenkert@5015: <dc:choose> rrenkert@5015: <dc:when test="dc:contains($parameters, 'user-id')"> rrenkert@5015: <dc:context connection="user"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT COALESCE(ld_mode, '') AS ldm, rrenkert@5015: COALESCE(ld_locations, '') AS ldl, rrenkert@5015: COALESCE(ld_from, '') AS ldf, rrenkert@5015: COALESCE(ld_to, '') AS ldt rrenkert@5015: FROM master_artifacts_range rrenkert@5015: WHERE gid = CAST(${artifact-id} as uuid) rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <dc:variable name="fromkm" type="number" expr="dc:fromValue($ldm, $ldl, $ldf)"/> rrenkert@5015: <dc:variable name="tokm" type="number" expr="dc:toValue($ldm, $ldl, $ldt)"/> rrenkert@5015: <dc:macro-body/> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </dc:when> rrenkert@5015: <dc:otherwise> rrenkert@5015: <dc:variable name="fromkm" type="number" expr="dc:fromValue('', '', '')"/> rrenkert@5015: <dc:variable name="tokm" type="number" expr="dc:toValue('', '', '')"/> rrenkert@5015: <dc:macro-body/> rrenkert@5015: </dc:otherwise> rrenkert@5015: </dc:choose> rrenkert@5015: </dc:macro> rrenkert@5015: rrenkert@5015: <dc:comment> rrenkert@5015: System part. Load data for the given river. rrenkert@5015: </dc:comment> ingo@1181: <dc:macro name="load-system"> ingo@1181: <dc:context connection="system"> ingo@1181: <dc:statement> ingo@1181: SELECT id AS river_id, name as river_name FROM rivers ingo@1181: WHERE lower(name) LIKE lower(${river}) ingo@1181: </dc:statement> ingo@1181: <dc:elements> rrenkert@5015: felix@1790: <dc:comment> rrenkert@5015: Base-data macros (mostly data imported from wst-files). felix@1790: </dc:comment> felix@1790: <dc:macro name="basedata_0"> rrenkert@5015: <dc:call-macro name="user-range"> felix@1790: <dc:comment comment=" BASEDATA ---------------------------"/> felix@1790: <basedata> rrenkert@5015: <dc:context connection="system"> felix@1790: <dc:statement> felix@1790: SELECT id AS prot_id, felix@1790: description AS prot_description felix@1790: FROM wsts WHERE kind = 0 AND river_id = ${river_id} felix@1790: </dc:statement> felix@1790: <dc:elements> felix@1790: <basedata> felix@1790: <dc:attribute name="name" value="${prot_description}"/> felix@1790: <dc:context> felix@4894: <dc:call-macro name="SQL-wst_columns_statement"/> felix@1790: <dc:elements> felix@1790: <column> felix@1790: <dc:attribute name="name" value="${prot_column_name}"/> felix@1790: <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> felix@1790: <dc:attribute name="factory" value="staticwkms"/> felix@4895: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> felix@1790: </column> felix@1790: </dc:elements> felix@1790: </dc:context> felix@1790: </basedata> felix@1790: </dc:elements> felix@1790: </dc:context> felix@1790: </basedata> rrenkert@5015: </dc:call-macro> felix@1790: </dc:macro> rrenkert@5015: felix@1916: <dc:macro name="basedata_0_wq"> rrenkert@5015: <dc:call-macro name="user-range"> felix@1916: <dc:comment comment=" BASEDATA ---------------------------"/> felix@1916: <basedata> rrenkert@5015: <dc:context connection="system"> felix@1916: <dc:statement> felix@1916: SELECT id AS prot_id, felix@1916: description AS prot_description felix@1916: FROM wsts WHERE kind = 0 AND river_id = ${river_id} felix@1916: </dc:statement> felix@1916: <dc:elements> felix@1916: <basedata> felix@1916: <dc:attribute name="name" value="${prot_description}"/> felix@1916: <dc:context> felix@4894: <dc:call-macro name="SQL-wst_columns_statement"/> felix@1916: <dc:elements> felix@1916: <column> felix@1916: <dc:attribute name="name" value="${prot_column_name}"/> felix@1916: <dc:attribute name="ids" value="base_data-wstv-${prot_rel_pos}-${prot_id}"/> felix@1916: <dc:attribute name="factory" value="wqinterpol"/> felix@4895: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> felix@1916: </column> felix@1916: </dc:elements> felix@1916: </dc:context> felix@1916: </basedata> felix@1916: </dc:elements> felix@1916: </dc:context> felix@1916: </basedata> rrenkert@5015: </dc:call-macro> felix@1916: </dc:macro> felix@1916: felix@4143: <dc:macro name="basedata_1_additionals_marks"> rrenkert@5015: <dc:call-macro name="user-range"> felix@4143: <dc:comment comment=".ZUS -------------------------------"/> felix@4143: <additionals> rrenkert@5015: <dc:context connection="system"> felix@4143: <dc:statement> felix@4143: SELECT id AS prot_id, felix@4143: description AS prot_description felix@4143: FROM wsts WHERE kind = 1 AND river_id = ${river_id} felix@4143: </dc:statement> felix@4143: <dc:elements> felix@4143: <additional> felix@4143: <dc:attribute name="name" value="${prot_description}"/> felix@4143: <dc:context> felix@4894: <dc:call-macro name="SQL-wst_columns_statement"/> felix@4143: <dc:elements> felix@4143: <column> felix@4143: <dc:attribute name="name" value="${prot_column_name}"/> felix@4143: <dc:attribute name="ids" value="additionalsmarks-wstv-${prot_rel_pos}-${prot_id}"/> felix@4143: <dc:attribute name="factory" value="staticwkms"/> felix@4895: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> felix@4143: </column> felix@4143: </dc:elements> felix@4143: </dc:context> felix@4143: </additional> felix@4143: </dc:elements> felix@4143: </dc:context> felix@4143: </additionals> rrenkert@5015: </dc:call-macro> felix@4143: </dc:macro> felix@4143: felix@1790: <dc:macro name="basedata_1_additionals"> rrenkert@5015: <dc:call-macro name="user-range"> felix@1790: <dc:comment comment=".ZUS -------------------------------"/> felix@2085: <additionals> rrenkert@5015: <dc:context connection="system"> felix@1790: <dc:statement> felix@1790: SELECT id AS prot_id, felix@1790: description AS prot_description felix@1790: FROM wsts WHERE kind = 1 AND river_id = ${river_id} felix@1790: </dc:statement> felix@1790: <dc:elements> felix@1790: <additional> felix@1790: <dc:attribute name="name" value="${prot_description}"/> felix@1790: <dc:context> felix@4894: <dc:call-macro name="SQL-wst_columns_statement"/> felix@1790: <dc:elements> felix@1790: <column> felix@1790: <dc:attribute name="name" value="${prot_column_name}"/> felix@1790: <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> felix@1790: <dc:attribute name="factory" value="staticwkms"/> felix@4895: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> felix@1790: </column> felix@1790: </dc:elements> felix@1790: </dc:context> felix@1790: </additional> felix@1790: </dc:elements> felix@1790: </dc:context> felix@2085: </additionals> rrenkert@5015: </dc:call-macro> felix@1790: </dc:macro> felix@1764: felix@2761: <dc:macro name="basedata_1_additionals-relative_point"> rrenkert@5015: <dc:call-macro name="user-range"> felix@2761: <dc:comment comment=".ZUS -------------------------------"/> felix@2761: <additionals> rrenkert@5015: <dc:context connection="system"> felix@1728: <dc:statement> felix@1728: SELECT id AS prot_id, felix@1728: description AS prot_description felix@1731: FROM wsts WHERE kind = 1 AND river_id = ${river_id} felix@1731: </dc:statement> felix@1731: <dc:elements> felix@2761: <relativepoint> felix@2761: <dc:attribute name="name" value="${prot_description}"/> felix@2761: <dc:context> felix@4894: <dc:call-macro name="SQL-wst_columns_statement"/> felix@2761: <dc:elements> felix@2761: <column> felix@2761: <dc:attribute name="name" value="${prot_column_name}"/> felix@2761: <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> felix@2761: <dc:attribute name="factory" value="staticwkms"/> felix@4895: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> felix@2761: </column> felix@2761: </dc:elements> felix@2761: </dc:context> felix@2761: </relativepoint> felix@1731: </dc:elements> felix@1731: </dc:context> felix@2761: </additionals> rrenkert@5015: </dc:call-macro> felix@2761: </dc:macro> felix@2761: felix@1905: <dc:macro name="basedata_2_fixations_wst"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <fixations> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 2 AND river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <fixation> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <!--dc:attribute name="ids" value="fixations-wstv-A-${prot_id}"/--> rrenkert@5015: <dc:context> rrenkert@5015: <dc:call-macro name="SQL-wst_columns_statement"/> rrenkert@5015: <dc:elements> rrenkert@5015: <column> rrenkert@5015: <dc:attribute name="name" value="${prot_column_name}"/> rrenkert@5015: <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="wqinterpol"/> rrenkert@5015: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> rrenkert@5015: </column> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </fixation> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </fixations> rrenkert@5015: </dc:call-macro> felix@1905: </dc:macro> felix@1905: felix@1905: <dc:macro name="basedata_2_fixations_wqkms"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <fixations> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 2 AND river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <fixation> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <dc:context> rrenkert@5015: <dc:call-macro name="SQL-wst_columns_statement"/> rrenkert@5015: <dc:elements> rrenkert@5015: <column> rrenkert@5015: <dc:attribute name="name" value="${prot_column_name}"/> rrenkert@5015: <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="wqinterpol"/> rrenkert@5015: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> rrenkert@5015: </column> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </fixation> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </fixations> rrenkert@5015: </dc:call-macro> felix@1905: </dc:macro> felix@1905: felix@1872: <dc:macro name="basedata_2_fixations"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <fixations> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 2 AND river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <fixation> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <dc:context> rrenkert@5015: <dc:call-macro name="SQL-wst_columns_statement"/> rrenkert@5015: <dc:elements> rrenkert@5015: <column> rrenkert@5015: <dc:attribute name="name" value="${prot_column_name}"/> rrenkert@5015: <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="staticwkms"/> rrenkert@5015: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> rrenkert@5015: </column> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </fixation> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </fixations> rrenkert@5015: </dc:call-macro> felix@1872: </dc:macro> felix@1872: felix@2749: <dc:macro name="basedata_2_fixations_relative_point"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <fixations> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 2 AND river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <relativepoint> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <dc:context> rrenkert@5015: <dc:call-macro name="SQL-wst_columns_statement"/> rrenkert@5015: <dc:elements> rrenkert@5015: <column> rrenkert@5015: <dc:attribute name="name" value="${prot_column_name}"/> rrenkert@5015: <dc:attribute name="ids" value="fixations-wstv-${prot_rel_pos}-${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="staticwkms"/> rrenkert@5015: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> rrenkert@5015: </column> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </relativepoint> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </fixations> rrenkert@5015: </dc:call-macro> felix@2749: </dc:macro> felix@2751: felix@3283: <dc:macro name="basedata_3_officials"> rrenkert@5015: <dc:call-macro name="user-range"> felix@3283: <dc:comment comment=".wst -------------------------------"/> felix@3283: <officiallines> rrenkert@5015: <dc:context connection="system"> felix@3283: <dc:statement> felix@3283: SELECT id AS prot_id, felix@3283: description AS prot_description felix@3283: FROM wsts WHERE kind = 3 AND river_id = ${river_id} felix@3283: </dc:statement> felix@3283: <dc:elements> felix@3283: <official> felix@3283: <dc:attribute name="name" value="${prot_description}"/> felix@3283: <dc:context> felix@4894: <dc:call-macro name="SQL-wst_columns_statement"/> felix@3283: <dc:elements> felix@3283: <column> felix@3283: <dc:attribute name="name" value="${prot_column_name}"/> felix@3283: <dc:attribute name="ids" value="additionals-wstv-${prot_rel_pos}-${prot_id}"/> felix@4124: <dc:attribute name="factory" value="staticwqkms"/> felix@4895: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> felix@3283: </column> felix@3283: </dc:elements> felix@3283: </dc:context> felix@3283: </official> felix@3283: </dc:elements> felix@3283: </dc:context> felix@3283: </officiallines> rrenkert@5015: </dc:call-macro> felix@3283: </dc:macro> felix@3283: felix@2751: <dc:macro name="basedata_4_heightmarks-points-relative_points"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <heightmarks> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 4 AND river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <relativepoint> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <dc:context> rrenkert@5015: <dc:call-macro name="SQL-wst_columns_statement"/> rrenkert@5015: <dc:elements> rrenkert@5015: <column> rrenkert@5015: <dc:attribute name="name" value="${prot_column_name}"/> rrenkert@5015: <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="staticwkms"/> rrenkert@5015: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> rrenkert@5015: </column> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </relativepoint> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </heightmarks> rrenkert@5015: </dc:call-macro> felix@2751: </dc:macro> felix@2751: felix@1869: <dc:macro name="basedata_4_heightmarks-points"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <heightmarks> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 4 AND river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <heightmark> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <dc:context> rrenkert@5015: <dc:call-macro name="SQL-wst_columns_statement"/> rrenkert@5015: <dc:elements> rrenkert@5015: <column> rrenkert@5015: <dc:attribute name="name" value="${prot_column_name}"/> rrenkert@5015: <dc:attribute name="ids" value="heightmarks_points-wstv-${prot_rel_pos}-${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="staticwkms"/> rrenkert@5015: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> rrenkert@5015: </column> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </heightmark> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </heightmarks> rrenkert@5015: </dc:call-macro> felix@1869: </dc:macro> felix@1978: felix@1916: <dc:macro name="basedata_4_heightmarks-wq"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <heightmarks> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 4 AND river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <heightmark> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <dc:context> rrenkert@5015: <dc:call-macro name="SQL-wst_columns_statement"/> rrenkert@5015: <dc:elements> rrenkert@5015: <column> rrenkert@5015: <dc:attribute name="name" value="${prot_column_name}"/> rrenkert@5015: <dc:attribute name="ids" value="heightmarks_annotations-wstv-${prot_rel_pos}-${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="wqinterpol"/> rrenkert@5015: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> rrenkert@5015: </column> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </heightmark> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </heightmarks> rrenkert@5015: </dc:call-macro> felix@1916: </dc:macro> felix@1869: felix@2751: <dc:macro name="basedata_5_flood-protections_relative_points"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <flood_protections> rrenkert@5015: <dc:attribute name="id" value="flood-protections-${river_id}"/> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 5 AND river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <relativepoint> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <dc:attribute name="db-id" value="${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="staticwkms"/> rrenkert@5015: <columns> rrenkert@5015: <dc:context> rrenkert@5015: <dc:call-macro name="SQL-wst_columns_statement"/> rrenkert@5015: <dc:elements> rrenkert@5015: <column> rrenkert@5015: <dc:attribute name="name" value="${prot_column_name}"/> rrenkert@5015: <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="staticwkms"/> rrenkert@5015: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> rrenkert@5015: </column> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </columns> rrenkert@5015: </relativepoint> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </flood_protections> rrenkert@5015: </dc:call-macro> rrenkert@5015: </dc:macro> rrenkert@5015: rrenkert@5015: <dc:macro name="basedata_5_flood-protections"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <flood_protections> rrenkert@5015: <dc:attribute name="id" value="flood-protections-${river_id}"/> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 5 AND river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <flood_protection> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <dc:attribute name="db-id" value="${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="staticwkms"/> felix@2751: <dc:context> felix@4894: <dc:call-macro name="SQL-wst_columns_statement"/> felix@2751: <dc:elements> felix@2751: <column> felix@2751: <dc:attribute name="name" value="${prot_column_name}"/> felix@2751: <dc:attribute name="ids" value="flood_protection-wstv-${prot_rel_pos}-${prot_id}"/> felix@2751: <dc:attribute name="factory" value="staticwkms"/> felix@4895: <dc:attribute name="info" value="${info} [km ${deffrom} - ${defto}]"/> felix@2751: </column> felix@2751: </dc:elements> felix@2751: </dc:context> rrenkert@5015: </flood_protection> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </flood_protections> rrenkert@5015: </dc:call-macro> felix@1905: </dc:macro> felix@1905: felix@1851: <dc:macro name="mainvalues"> felix@1851: <mainvalue> felix@1851: <dc:attribute name="factory" value="mainvalue"/> felix@1851: <dc:attribute name="ids" value="${river_id}"/> felix@1851: </mainvalue> felix@4126: <wmainvalue> felix@4126: <dc:attribute name="factory" value="mainvalue"/> felix@4126: <dc:attribute name="ids" value="${river_id}:w"/> felix@4126: </wmainvalue> felix@4126: <qmainvalue> felix@4126: <dc:attribute name="factory" value="mainvalue"/> felix@4126: <dc:attribute name="ids" value="${river_id}:q"/> felix@4126: </qmainvalue> felix@1851: </dc:macro> felix@1865: felix@3574: <dc:macro name="qsectors"> felix@3574: <qsector> felix@3574: <dc:attribute name="factory" value="qsectors"/> felix@3574: <dc:attribute name="ids" value="${river_id}"/> felix@3574: </qsector> felix@3574: </dc:macro> felix@3574: felix@1865: <dc:macro name="annotations"> felix@1865: <annotation> felix@1865: <dc:attribute name="factory" value="annotations"/> felix@1865: <dc:attribute name="ids" value="${river_id}"/> felix@1865: </annotation> felix@1865: </dc:macro> felix@1865: felix@4014: <dc:macro name="annotations_per_type"> felix@4014: <annotations> felix@4014: <dc:context> felix@4122: <annotation> felix@4125: <dc:attribute name="name" value="all_annotations"/> felix@4122: <dc:attribute name="factory" value="annotations"/> felix@4122: <dc:attribute name="ids" value="${river_id}"/> felix@4122: </annotation> felix@4014: <dc:statement> felix@4014: SELECT id AS anno_id, felix@4014: name AS anno_description felix@4014: FROM annotation_types felix@4014: </dc:statement> felix@4014: <dc:elements> felix@4014: <annotation> felix@4014: <dc:attribute name="name" value="${anno_description}"/> felix@4014: <dc:attribute name="factory" value="annotations"/> felix@4014: <dc:attribute name="ids" value="${river_id}:${anno_description}"/> felix@4014: </annotation> felix@4014: </dc:elements> felix@4014: </dc:context> felix@4014: </annotations> felix@4014: </dc:macro> felix@4014: felix@1978: <dc:macro name="cross_sections"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <cross_sections> rrenkert@5015: <dc:attribute name="id" value="flood-protections-${river_id}"/> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5164: SELECT DISTINCT rrenkert@5015: cs.id AS prot_id, rrenkert@5015: cs.description AS prot_description rrenkert@5015: FROM cross_sections cs rrenkert@5015: JOIN cross_section_lines csl ON csl.cross_section_id = cs.id rrenkert@5015: WHERE cs.river_id = ${river_id} rrenkert@5015: AND csl.km BETWEEN ${fromkm} AND ${tokm} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <cross_section> rrenkert@5015: <dc:attribute name="name" value="${prot_description}"/> rrenkert@5015: <dc:attribute name="ids" value="${prot_id}"/> rrenkert@5015: <dc:attribute name="factory" value="crosssections"/> rrenkert@5015: </cross_section> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </cross_sections> rrenkert@5015: </dc:call-macro> felix@1978: </dc:macro> felix@1978: felix@2140: <dc:macro name="hyks"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <hyks> rrenkert@5015: <dc:attribute name="id" value="hyk-${river_id}"/> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5164: SELECT DISTINCT rrenkert@5015: h.id AS hyk_id, rrenkert@5015: h.description AS hyk_description rrenkert@5015: FROM hyks h rrenkert@5015: JOIN hyk_entries he ON he.hyk_id = h.id rrenkert@5015: WHERE river_id = ${river_id} rrenkert@5015: AND he.km BETWEEN ${fromkm} AND ${tokm} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <hyk> rrenkert@5015: <dc:attribute name="name" value="${hyk_description}"/> rrenkert@5015: <dc:attribute name="ids" value="${hyk_id}"/> rrenkert@5015: <dc:attribute name="factory" value="hyk"/> rrenkert@5015: </hyk> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </hyks> rrenkert@5015: </dc:call-macro> felix@2140: </dc:macro> felix@1869: felix@4455: <dc:macro name="flow_velocity_measurements"> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <flowvelocitymeasurement> rrenkert@5015: <dc:context connection="system"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS fvmid, rrenkert@5015: description AS fvmd rrenkert@5015: FROM flow_velocity_measurements WHERE river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <flow_velocity_measurement> rrenkert@5015: <dc:attribute name="name" value="${fvmd}"/> rrenkert@5015: <dc:attribute name="ids" value="${fvmid}"/> rrenkert@5015: <dc:attribute name="factory" value="flowvelocity"/> rrenkert@5015: <dc:context> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id, description, station, datetime, v, w, q rrenkert@5015: FROM flow_velocity_measure_values rrenkert@5015: WHERE measurements_id = ${fvmid} rrenkert@5015: AND station BETWEEN ${fromkm} AND ${tokm} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <measurement_value> rrenkert@5015: <dc:attribute name="name" value="${id}-${description}-${station}-${datetime}"/> rrenkert@5015: <dc:attribute name="ids" value="${id}"/> rrenkert@5015: <dc:attribute name="factory" value="flowvelocity"/> rrenkert@5015: </measurement_value> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </flow_velocity_measurement> felix@4455: </dc:elements> felix@4455: </dc:context> felix@4455: </flowvelocitymeasurement> rrenkert@5015: </dc:call-macro> rrenkert@5015: </dc:macro> rrenkert@5015: rrenkert@5015: <dc:macro name="sounding-width"> rrenkert@5015: <soundings_width> rrenkert@5015: <dc:context> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS bedh_id, rrenkert@5015: year AS bedh_year, rrenkert@5015: description AS bedh_descr rrenkert@5015: FROM bed_height_single WHERE river_id = ${river_id} rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <height> rrenkert@5015: <dc:attribute name="factory" value="bedheight"/> rrenkert@5015: <dc:attribute name="ids" value="bedheight-singlevalues-${bedh_id}-${bedh_year}"/> rrenkert@5015: <dc:attribute name="description" value="${bedh_descr}"/> rrenkert@5015: </height> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </soundings_width> felix@4455: </dc:macro> felix@4455: felix@4595: <dc:macro name="longitudinal-section-prototype"> rrenkert@5015: <dc:call-macro name="basedata_0"/> rrenkert@5015: <dc:call-macro name="basedata_1_additionals"/> rrenkert@5015: <dc:comment comment=" FIXATIONS ---------------------------"/> rrenkert@5015: <dc:call-macro name="basedata_2_fixations"/> rrenkert@5015: <dc:comment comment=" HOEHENMARKEN ---------------------------"/> rrenkert@5015: <dc:call-macro name="basedata_4_heightmarks-points"/> rrenkert@5015: <dc:comment comment=" AMTL LINIEN ---------------------------"/> rrenkert@5015: <dc:call-macro name="basedata_3_officials"/> rrenkert@5015: <dc:call-macro name="basedata_5_flood-protections"/> rrenkert@5015: <dc:call-macro name="annotations_per_type"/> felix@4595: </dc:macro> felix@4595: felix@1869: <dc:comment> felix@1869: + River-Node felix@1869: </dc:comment> ingo@1181: <river> ingo@1181: <dc:attribute name="name" value="${river_name}"/> felix@1865: felix@1865: <dc:choose> felix@1865: <dc:when test="dc:contains($parameters, 'recommended')"> felix@1865: <dc:comment> felix@2101: Recommendations (client shall load immediately). felix@1865: </dc:comment> felix@1865: <dc:if test="dc:contains($artifact-outs, 'w_differences') or (dc:contains($artifact-outs, 'discharge_longitudinal_section'))"> felix@2101: <dc:call-macro name="annotations"/> felix@1865: </dc:if> felix@1978: <dc:if test="dc:contains($artifact-outs, 'cross_section')"> felix@1978: <dc:call-macro name="cross_sections"/> felix@2140: <dc:call-macro name="hyks"/> felix@1978: </dc:if> felix@4125: <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> felix@4125: <dc:call-macro name="mainvalues"/> felix@4125: </dc:if> felix@4596: <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> felix@4596: <dc:call-macro name="mainvalues"/> felix@4596: </dc:if> felix@2721: <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> felix@4434: <dc:call-macro name="annotations"/> felix@2770: <dc:call-macro name="mainvalues"/> felix@2721: </dc:if> felix@3574: <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> felix@3574: <dc:call-macro name="qsectors"/> felix@3574: </dc:if> felix@5126: <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> felix@5126: <dc:call-macro name="annotations"/> felix@5126: </dc:if> felix@3579: <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> felix@3579: <dc:call-macro name="annotations"/> felix@3579: </dc:if> raimund@3899: <dc:if test="dc:contains($artifact-outs, 'bed_difference_epoch')"> raimund@3899: <dc:call-macro name="annotations"/> raimund@3899: </dc:if> raimund@3899: <dc:if test="dc:contains($artifact-outs, 'bed_difference_year')"> raimund@3899: <dc:call-macro name="annotations"/> raimund@3899: </dc:if> raimund@3899: <dc:if test="dc:contains($artifact-outs, 'bed_difference_height_year')"> raimund@3899: <dc:call-macro name="annotations"/> raimund@3899: </dc:if> felix@4393: <dc:if test="dc:contains($artifact-outs, 'flow_velocity')"> felix@4393: <dc:call-macro name="annotations"/> felix@4393: </dc:if> felix@1865: </dc:when> felix@1865: <dc:otherwise> felix@1869: <dc:comment> felix@1869: Non - Recommendations. felix@1869: </dc:comment> felix@1869: <dc:if test="dc:contains($artifact-outs, 'cross_section')"> felix@2101: <dc:call-macro name="basedata_0"/> felix@2101: <dc:call-macro name="basedata_1_additionals"/> felix@2736: <dc:call-macro name="basedata_2_fixations"/> felix@3570: <dc:call-macro name="basedata_3_officials"/> felix@2736: <dc:call-macro name="basedata_4_heightmarks-points"/> raimund@2153: <dc:call-macro name="cross_sections"/> felix@2689: <dc:call-macro name="hyks"/> felix@1869: </dc:if> felix@3627: <!--dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> felix@1916: <dc:call-macro name="basedata_0_wq"/> felix@1916: <dc:call-macro name="basedata_4_heightmarks-wq"/> felix@3627: </dc:if--> felix@4597: <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')) or (dc:contains($artifact-outs, 'discharge_longitudinal_section'))"> felix@4597: <dc:call-macro name="longitudinal-section-prototype"/> felix@1869: </dc:if> felix@4596: <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> felix@4596: <dc:call-macro name="mainvalues"/> felix@4596: <dc:call-macro name="basedata_2_fixations_relative_point"/> felix@4596: <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> felix@4596: <dc:call-macro name="basedata_5_flood-protections_relative_points"/> felix@4596: </dc:if> felix@4123: <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> felix@4434: <dc:call-macro name="annotations"/> felix@4123: <!--dc:call-macro name="basedata_0"/--> felix@4123: <dc:call-macro name="basedata_1_additionals-relative_point"/> felix@4123: <dc:comment comment=" FIXATIONS ---------------------------"/> felix@4123: <dc:call-macro name="basedata_2_fixations_relative_point"/> felix@4123: <dc:comment comment=" HOEHENMARKEN ---------------------------"/> felix@4123: <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> felix@4123: <dc:call-macro name="basedata_5_flood-protections_relative_points"/> felix@4123: </dc:if> felix@4123: <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> felix@4123: <dc:call-macro name="basedata_0_wq"/> felix@4143: <dc:call-macro name="basedata_1_additionals_marks"/> felix@4123: <dc:call-macro name="basedata_2_fixations_wqkms"/> felix@4123: <dc:call-macro name="basedata_3_officials"/> felix@4123: <dc:call-macro name="basedata_4_heightmarks-points"/> felix@4123: <dc:call-macro name="basedata_5_flood-protections_relative_points"/> felix@4123: </dc:if> felix@4123: <dc:if test="dc:contains($artifact-outs, 'fix_deltawt_curve')"> felix@4123: </dc:if> felix@4123: <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> felix@4123: <dc:call-macro name="annotations"/> felix@4123: </dc:if> felix@4598: <dc:if test="dc:contains($artifact-outs, 'map')"> felix@4598: <map> felix@4598: <dc:call-macro name="flood-map-complete"/> felix@4598: </map> felix@4598: </dc:if> felix@4455: <dc:if test="dc:contains($artifact-outs, 'flow_velocity')"> felix@4455: <dc:call-macro name="annotations"/> felix@4455: <dc:call-macro name="flow_velocity_measurements"/> felix@4455: </dc:if> bjoern@4538: <dc:comment> bjoern@4538: MINFO bedheight middle bjoern@4538: </dc:comment> bjoern@4538: <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')"> rrenkert@5015: <dc:call-macro name="sounding-width"/> bjoern@4538: </dc:if> felix@1869: <dc:comment comment="--- non-recommendations---"/> felix@1865: </dc:otherwise> felix@1865: </dc:choose> felix@1872: felix@1764: felix@1728: <dc:if test="dc:contains($artifact-outs, 'waterlevels')"> felix@1905: felix@1875: <!-- base data --> felix@1875: <dc:call-macro name="basedata_0"/> felix@1905: felix@1905: <!-- extra-longitudinal-sections --> felix@1875: <dc:call-macro name="basedata_1_additionals"/> felix@1875: felix@1875: <!-- fixations --> felix@1875: <dc:call-macro name="basedata_2_fixations"/> felix@1875: felix@1875: <!-- flood water marks--> felix@1875: <dc:call-macro name="basedata_4_heightmarks-points"/> felix@1905: felix@1905: <!-- flood protection --> felix@1905: <dc:call-macro name="basedata_5_flood-protections"/> felix@1905: felix@1728: </dc:if> felix@1905: <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve') and (dc:contains($parameters, 'recommended'))"> felix@1905: <!--dc:call-macro name="basedata_2_fixations_wst"/--> felix@1905: </dc:if> felix@1905: felix@1773: <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve') and not (dc:contains($parameters, 'recommended'))"> felix@2324: <discharge_table_nn> felix@2324: <discharge_table_gauge> ingo@1181: <dc:context> ingo@1181: <dc:statement> ingo@1181: SELECT id AS gauge_id, ingo@1181: name AS gauge_name ingo@1181: FROM gauges WHERE river_id = ${river_id} ingo@1181: </dc:statement> ingo@1181: <dc:elements> ingo@1181: <gauge> ingo@1181: <dc:attribute name="name" value="${gauge_name}"/> ingo@1181: <dc:attribute name="db-id" value="${gauge_id}"/> felix@3051: <dc:attribute name="factory" value="gaugedischarge"/> felix@3051: <dc:attribute name="from" value="${g_start}"/> felix@3051: <dc:attribute name="to" value="${g_stop}"/> felix@3051: <dc:attribute name="ids" value="${gauge_name}"/> felix@3051: </gauge> felix@3051: <!-- felix@3051: <gauge> felix@3051: <dc:attribute name="name" value="${gauge_name}"/> felix@3051: <dc:attribute name="db-id" value="${gauge_id}"/> ingo@1181: <dc:context> ingo@1181: <dc:statement> sascha@3219: SELECT description AS gauge_desc, ingo@1181: d.id AS discharge_id, sascha@3219: ti.start_time AS g_start, ingo@1181: ti.stop_time AS g_stop sascha@3219: FROM discharge_tables d JOIN time_intervals ti ingo@1181: ON d.time_interval_id = ti.id ingo@1181: WHERE d.gauge_id = ${gauge_id} AND d.kind = 1 ingo@1181: </dc:statement> ingo@1181: <dc:elements> ingo@1181: <historical> ingo@1181: <dc:attribute name="name" value="${gauge_desc}"/> felix@2732: <dc:attribute name="factory" value="gaugedischarge"/> ingo@1181: <dc:attribute name="from" value="${g_start}"/> ingo@1181: <dc:attribute name="to" value="${g_stop}"/> felix@2732: <dc:attribute name="ids" value="${discharge_id}-${g_start}-${g_stop}"/> felix@2732: </historical> ingo@1181: </dc:elements> ingo@1181: </dc:context> ingo@1181: </gauge> felix@3051: --> ingo@1181: </dc:elements> ingo@1181: </dc:context> felix@2324: </discharge_table_gauge> felix@1872: felix@2324: </discharge_table_nn> felix@1905: felix@1905: <dc:call-macro name="basedata_2_fixations_wst"/> felix@1905: felix@1905: <dc:call-macro name="basedata_5_flood-protections"/> felix@1905: felix@1905: <!-- former waterlevels --> felix@1905: <dc:call-macro name="basedata_0"/> felix@1905: felix@1905: <dc:call-macro name="basedata_1_additionals"/> felix@1905: felix@1905: <!-- former flood-water-marks --> felix@1905: <dc:call-macro name="basedata_4_heightmarks-points"/> felix@2324: <computed_discharge_curve> felix@1851: <dc:call-macro name="mainvalues"/> felix@2324: </computed_discharge_curve> ingo@1181: </dc:if> felix@1905: felix@3592: <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve') and not (dc:contains($parameters, 'recommended'))"> felix@3585: <discharge_table_nn> felix@3585: <discharge_table_gauge> felix@3585: <dc:context> felix@3585: <dc:statement> felix@3585: SELECT id AS gauge_id, felix@3585: name AS gauge_name felix@3585: FROM gauges WHERE river_id = ${river_id} felix@3585: </dc:statement> felix@3585: <dc:elements> felix@3585: <gauge> felix@3585: <dc:attribute name="name" value="${gauge_name}"/> felix@3585: <dc:attribute name="db-id" value="${gauge_id}"/> felix@3585: <dc:attribute name="factory" value="gaugedischarge"/> felix@3585: <dc:attribute name="from" value="${g_start}"/> felix@3585: <dc:attribute name="to" value="${g_stop}"/> felix@3585: <dc:attribute name="ids" value="${gauge_name}"/> felix@3585: </gauge> ingo@1181: </dc:elements> ingo@1181: </dc:context> felix@3585: </discharge_table_gauge> felix@3585: </discharge_table_nn> ingo@1181: </dc:if> felix@3585: rrenkert@5312: <dc:if test="dc:contains($artifact-outs, 'floodmap') or dc:contains($artifact-outs, 'floodmap-hws')"> ingo@1181: <floodmap> ingo@1181: <dc:choose> ingo@1181: <dc:when test="dc:contains($parameters, 'recommended')"> ingo@1181: <dc:call-macro name="flood-map-recommended"/> ingo@1181: </dc:when> ingo@1185: <dc:when test="dc:contains($parameters, 'dem')"> ingo@1185: <dc:call-macro name="flood-map-dem"/> ingo@1185: </dc:when> teichmann@5328: <!-- dc:when test="dc:contains($parameters, 'hws')"> rrenkert@5312: <dc:call-macro name="flood-map-hws-lines" /> rrenkert@5312: <dc:call-macro name="flood-map-hws-points" /> teichmann@5328: </dc:when --> ingo@1181: <dc:otherwise> ingo@1181: <dc:call-macro name="flood-map-complete"/> ingo@1181: </dc:otherwise> ingo@1181: </dc:choose> ingo@1181: </floodmap> teichmann@5328: <dc:if test="dc:contains($parameters, 'hws')"> teichmann@5328: <hws> teichmann@5328: <dc:call-macro name="flood-map-hws-lines" /> teichmann@5328: <dc:call-macro name="flood-map-hws-points" /> teichmann@5328: </hws> teichmann@5328: </dc:if> teichmann@5328: ingo@1181: <dc:macro name="flood-map-recommended"> ingo@1181: <dc:comment> ingo@1181: FIXME: Following two macros look identical to me. ingo@1181: </dc:comment> ingo@1181: <kilometrage> ingo@1181: <riveraxis> ingo@1181: <dc:attribute name="factory" value="riveraxis"/> ingo@1181: <dc:attribute name="ids" value="${river_id}"/> ingo@1181: </riveraxis> ingo@1181: </kilometrage> ingo@1181: <rastermap> ingo@1181: <background> ingo@1181: <dc:attribute name="factory" value="wmsbackground"/> ingo@1181: <dc:attribute name="ids" value="${river_id}"/> ingo@1181: </background> ingo@1181: </rastermap> ingo@1181: </dc:macro> ingo@1185: <dc:macro name="flood-map-dem"> ingo@1185: <dems> ingo@1185: <dc:context> ingo@1185: <dc:statement> aheinecke@5210: SELECT d.id AS dem_id, aheinecke@5210: r.a AS dem_lower, aheinecke@5210: r.b AS dem_upper, aheinecke@5210: d.name AS name, rrenkert@5226: d.projection || ' | ' || t.start_time || ' - ' || t.stop_time AS info aheinecke@5210: FROM dem d rrenkert@5226: JOIN ranges r ON d.range_id = r.id rrenkert@5226: JOIN time_intervals t ON d.time_interval_id = t.id rrenkert@5226: WHERE d.river_id = ${river_id} ingo@1185: </dc:statement> ingo@1185: <dc:elements> ingo@1186: <dem> ingo@1186: <dc:attribute name="factory" value="demfactory"/> ingo@1186: <dc:attribute name="ids" value="${dem_id}"/> ingo@3933: <dc:attribute name="name" value="${name}"/> ingo@3933: <dc:attribute name="info" value="${info}"/> ingo@1186: </dem> ingo@1185: </dc:elements> ingo@1185: </dc:context> ingo@1185: </dems> ingo@1185: </dc:macro> rrenkert@5312: <dc:macro name="flood-map-hws-lines"> rrenkert@5312: <dc:context> rrenkert@5312: <dc:statement> rrenkert@5312: SELECT DISTINCT rrenkert@5312: name AS hws_name, rrenkert@5312: official AS hws_official, rrenkert@5312: kind_id AS hws_kind rrenkert@5312: FROM hws_lines rrenkert@5312: WHERE river_id = ${river_id} rrenkert@5312: </dc:statement> rrenkert@5312: <lines> rrenkert@5312: <official> rrenkert@5312: <Durchlass> rrenkert@5312: <dc:elements filter="$hws_kind=1 and $hws_official=1"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Durchlass> rrenkert@5312: <Damm> rrenkert@5312: <dc:elements filter="$hws_kind=2 and $hws_official=1"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Damm> rrenkert@5312: <Graben> rrenkert@5312: <dc:elements filter="$hws_kind=3 and $hws_official=1"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Graben> rrenkert@5312: </official> rrenkert@5312: <inofficial> rrenkert@5312: <Durchlass> rrenkert@5312: <dc:elements filter="$hws_kind=1 and $hws_official=0"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Durchlass> rrenkert@5312: <Damn> rrenkert@5312: <dc:elements filter="$hws_kind=2 and $hws_official=0"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Damn> rrenkert@5312: <Graben> rrenkert@5312: <dc:elements filter="$hws_kind=3 and $hws_official=0"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Graben> rrenkert@5312: </inofficial> rrenkert@5312: </lines> rrenkert@5312: </dc:context> rrenkert@5312: </dc:macro> rrenkert@5312: <dc:macro name="flood-map-hws-points"> rrenkert@5312: <dc:context> rrenkert@5312: <dc:statement> rrenkert@5312: SELECT DISTINCT rrenkert@5312: name AS hws_points_name, rrenkert@5312: official AS hws_points_official, rrenkert@5312: kind_id AS hws_points_kind rrenkert@5312: FROM hws_points rrenkert@5312: WHERE river_id = ${river_id} rrenkert@5312: </dc:statement> rrenkert@5312: <points> rrenkert@5312: <official> rrenkert@5312: <Durchlass> rrenkert@5312: <dc:elements filter="$hws_points_kind=1 and $hws_points_official=1"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_points_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Durchlass> rrenkert@5312: <Damm> rrenkert@5312: <dc:elements filter="$hws_points_kind=2 and $hws_points_official=1"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_points_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Damm> rrenkert@5312: <Graben> rrenkert@5312: <dc:elements filter="$hws_kind=3 and $hws_official=1"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_points_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Graben> rrenkert@5312: </official> rrenkert@5312: <inofficial> rrenkert@5312: <Durchlass> rrenkert@5312: <dc:elements filter="$hws_points_kind=1 and $hws_points_official=0"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_points_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Durchlass> rrenkert@5312: <Damm> rrenkert@5312: <dc:elements filter="$hws_points_kind=2 and $hws_points_official=0"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_points_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Damm> rrenkert@5312: <Graben> rrenkert@5312: <dc:elements filter="$hws_points_kind=3 and $hws_points_official=0"> rrenkert@5312: <hws> rrenkert@5312: <dc:attribute name="factory" value="hwsfactory"/> rrenkert@5312: <dc:attribute name="name" value="${hws_points_name}"/> rrenkert@5312: </hws> rrenkert@5312: </dc:elements> rrenkert@5312: </Graben> rrenkert@5312: </inofficial> rrenkert@5312: </points> rrenkert@5312: </dc:context> rrenkert@5312: </dc:macro> ingo@1805: <dc:macro name="flood-map-km"> ingo@1805: <dc:context> ingo@1805: <dc:statement> ingo@1805: SELECT count(*) as km_exists ingo@1805: FROM river_axes_km WHERE river_id = ${river_id} ingo@1805: </dc:statement> ingo@1805: <dc:elements> ingo@1805: <dc:if test="$km_exists>0"> ingo@1805: <km> ingo@1805: <dc:attribute name="factory" value="wmskmfactory"/> ingo@1805: <dc:attribute name="ids" value="${river_id}"/> ingo@1805: </km> ingo@1805: </dc:if> ingo@1805: </dc:elements> ingo@1805: </dc:context> ingo@1805: </dc:macro> ingo@1836: <dc:macro name="flood-map-qps"> ingo@1836: <dc:context> ingo@1836: <dc:statement> ingo@1836: SELECT count(*) as km_exists ingo@1836: FROM cross_section_tracks WHERE river_id = ${river_id} ingo@1836: </dc:statement> ingo@1836: <dc:elements> ingo@1836: <dc:if test="$km_exists>0"> ingo@1836: <qps> ingo@1836: <dc:attribute name="factory" value="wmsqpsfactory"/> ingo@1836: <dc:attribute name="ids" value="${river_id}"/> ingo@1836: </qps> ingo@1836: </dc:if> ingo@1836: </dc:elements> ingo@1836: </dc:context> ingo@1836: </dc:macro> ingo@2683: <dc:macro name="flood-map-hydr-boundaries"> ingo@2683: <hydr_boundaries_lines> ingo@2683: <dc:call-macro name="flood-map-hydr-boundaries-lines"/> ingo@2683: </hydr_boundaries_lines> ingo@2683: <hydr_boundaries_polygons> ingo@2683: <dc:call-macro name="flood-map-hydr-boundaries-poly"/> ingo@2683: </hydr_boundaries_polygons> ingo@2683: </dc:macro> ingo@2683: <dc:macro name="flood-map-hydr-boundaries-lines"> ingo@2683: <bfg> ingo@2683: <dc:context> ingo@2683: <dc:statement> ingo@2683: SELECT count(*) as km_exists, name as name ingo@2683: FROM hydr_boundaries WHERE river_id = ${river_id} AND kind = 1 GROUP BY name ingo@2683: </dc:statement> ingo@2683: <dc:elements> ingo@2683: <dc:if test="$km_exists>0"> ingo@2683: <hydrboundary> ingo@2683: <dc:attribute name="factory" value="wmshydrboundariesfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2683: <dc:attribute name="name" value="${name}"/> ingo@2683: </hydrboundary> ingo@2683: </dc:if> ingo@2683: </dc:elements> ingo@2683: </dc:context> ingo@2683: </bfg> ingo@2683: <land> ingo@2683: <dc:context> ingo@2683: <dc:statement> ingo@2683: SELECT count(*) as km_exists, name as name ingo@2683: FROM hydr_boundaries WHERE river_id = ${river_id} AND kind = 2 GROUP BY name ingo@2683: </dc:statement> ingo@2683: <dc:elements> ingo@2683: <dc:if test="$km_exists>0"> ingo@2683: <hydrboundary> ingo@2683: <dc:attribute name="factory" value="wmshydrboundariesfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2683: <dc:attribute name="name" value="${name}"/> ingo@2683: </hydrboundary> ingo@2683: </dc:if> ingo@2683: </dc:elements> ingo@2683: </dc:context> ingo@2683: </land> ingo@2683: </dc:macro> ingo@2683: <dc:macro name="flood-map-hydr-boundaries-poly"> ingo@2683: <bfg> ingo@2683: <dc:context> ingo@2683: <dc:statement> ingo@2683: SELECT count(*) as km_exists, name as name ingo@2683: FROM hydr_boundaries_poly WHERE river_id = ${river_id} AND kind = 1 GROUP BY name ingo@2683: </dc:statement> ingo@2683: <dc:elements> ingo@2683: <dc:if test="$km_exists>0"> ingo@2683: <hws> ingo@2683: <dc:attribute name="factory" value="wmshydrboundariespolyfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2683: <dc:attribute name="name" value="${name}"/> ingo@2683: </hws> ingo@2683: </dc:if> ingo@2683: </dc:elements> ingo@2683: </dc:context> ingo@2683: </bfg> ingo@2683: <land> ingo@2683: <dc:context> ingo@2683: <dc:statement> ingo@2683: SELECT count(*) as km_exists, name as name ingo@2683: FROM hydr_boundaries_poly WHERE river_id = ${river_id} AND kind = 2 GROUP BY name ingo@2683: </dc:statement> ingo@2683: <dc:elements> ingo@2683: <dc:if test="$km_exists>0"> ingo@2683: <hws> ingo@2683: <dc:attribute name="factory" value="wmshydrboundariespolyfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2683: <dc:attribute name="name" value="${name}"/> ingo@2683: </hws> ingo@2683: </dc:if> ingo@2683: </dc:elements> ingo@2683: </dc:context> ingo@2683: </land> ingo@2683: </dc:macro> ingo@1857: <dc:macro name="flood-map-floodplain"> ingo@1857: <dc:context> ingo@1857: <dc:statement> ingo@1857: SELECT count(*) as km_exists ingo@1857: FROM floodplain WHERE river_id = ${river_id} ingo@1857: </dc:statement> ingo@1857: <dc:elements> ingo@1857: <dc:if test="$km_exists>0"> ingo@1857: <floodplain> ingo@1857: <dc:attribute name="factory" value="wmsfloodplainfactory"/> ingo@1857: <dc:attribute name="ids" value="${river_id}"/> ingo@1857: </floodplain> ingo@1857: </dc:if> ingo@1857: </dc:elements> ingo@1857: </dc:context> ingo@1857: </dc:macro> aheinecke@5096: <dc:macro name="flood-map-hwslines"> ingo@1870: <dc:context> ingo@1870: <dc:statement> ingo@2683: SELECT count(*) as km_exists, name as name aheinecke@5096: FROM hws_lines WHERE river_id = ${river_id} GROUP BY name ingo@1870: </dc:statement> ingo@1870: <dc:elements> ingo@1870: <dc:if test="$km_exists>0"> ingo@2683: <line> ingo@1870: <dc:attribute name="factory" value="wmslinefactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2683: <dc:attribute name="name" value="${name}"/> ingo@2683: </line> ingo@1870: </dc:if> ingo@1870: </dc:elements> ingo@1870: </dc:context> ingo@1870: </dc:macro> ingo@1871: <dc:macro name="flood-map-buildings"> ingo@1871: <dc:context> ingo@1871: <dc:statement> ingo@2683: SELECT count(*) as km_exists, name as name ingo@2683: FROM buildings WHERE river_id = ${river_id} GROUP BY name ingo@1871: </dc:statement> ingo@1871: <dc:elements> ingo@1871: <dc:if test="$km_exists>0"> ingo@2683: <building> ingo@1871: <dc:attribute name="factory" value="wmsbuildingsfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2683: <dc:attribute name="name" value="${name}"/> ingo@2683: </building> ingo@1871: </dc:if> ingo@1871: </dc:elements> ingo@1871: </dc:context> ingo@1871: </dc:macro> ingo@1873: <dc:macro name="flood-map-fixpoints"> ingo@1873: <dc:context> ingo@1873: <dc:statement> ingo@2683: SELECT count(*) as km_exists, name as name ingo@2683: FROM fixpoints WHERE river_id = ${river_id} GROUP BY name ingo@1873: </dc:statement> ingo@1873: <dc:elements> ingo@1873: <dc:if test="$km_exists>0"> ingo@2683: <fixpoint> ingo@1873: <dc:attribute name="factory" value="wmsfixpointsfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2683: <dc:attribute name="name" value="${name}"/> ingo@2683: </fixpoint> ingo@1873: </dc:if> ingo@1873: </dc:elements> ingo@1873: </dc:context> ingo@1873: </dc:macro> ingo@2684: <dc:macro name="flood-map-gaugelocations"> ingo@2684: <dc:context> ingo@2684: <dc:statement> ingo@2684: SELECT count(*) as km_exists, name as name ingo@2684: FROM gauge_location WHERE river_id = ${river_id} GROUP BY name ingo@2684: </dc:statement> ingo@2684: <dc:elements> ingo@2684: <dc:if test="$km_exists>0"> ingo@2684: <gaugelocation> ingo@2684: <dc:attribute name="factory" value="wmsgaugelocationfactory"/> ingo@2684: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2684: <dc:attribute name="name" value="${name}"/> ingo@2684: </gaugelocation> ingo@2684: </dc:if> ingo@2684: </dc:elements> ingo@2684: </dc:context> ingo@2684: </dc:macro> ingo@2580: <dc:macro name="flood-map-uesk"> ingo@2580: <uesk> ingo@2580: <calculations> ingo@2580: <current> ingo@2582: <bfg> ingo@2582: <dc:context> ingo@2582: <dc:statement> ingo@2582: SELECT count(*) as uesg_exist, name as name ingo@2582: FROM floodmaps ingo@2582: WHERE river_id = ${river_id} AND kind = 111 ingo@2582: GROUP BY name, kind ingo@2582: </dc:statement> ingo@2582: <dc:elements> ingo@2582: <dc:if test="$uesg_exist>0"> ingo@2582: <floodmaps> ingo@2582: <dc:attribute name="factory" value="wmsfloodmapsfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2582: <dc:attribute name="name" value="${name}"/> ingo@2582: </floodmaps> ingo@2582: </dc:if> ingo@2582: </dc:elements> ingo@2582: </dc:context> ingo@2582: </bfg> ingo@2582: <land> ingo@2582: <dc:context> ingo@2582: <dc:statement> ingo@2582: SELECT count(*) as uesg_exist, name as name ingo@2582: FROM floodmaps ingo@2582: WHERE river_id = ${river_id} AND kind = 112 ingo@2582: GROUP BY name, kind ingo@2582: </dc:statement> ingo@2582: <dc:elements> ingo@2582: <dc:if test="$uesg_exist>0"> ingo@2582: <floodmaps> ingo@2582: <dc:attribute name="factory" value="wmsfloodmapsfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2582: <dc:attribute name="name" value="${name}"/> ingo@2582: </floodmaps> ingo@2582: </dc:if> ingo@2582: </dc:elements> ingo@2582: </dc:context> ingo@2582: </land> ingo@2580: </current> ingo@2580: <potentiel> ingo@2582: <bfg> ingo@2582: <dc:context> ingo@2582: <dc:statement> ingo@2582: SELECT count(*) as uesg_exist, name as name ingo@2582: FROM floodmaps ingo@2582: WHERE river_id = ${river_id} AND kind = 121 ingo@2582: GROUP BY name, kind ingo@2582: </dc:statement> ingo@2582: <dc:elements> ingo@2582: <dc:if test="$uesg_exist>0"> ingo@2582: <floodmaps> ingo@2582: <dc:attribute name="factory" value="wmsfloodmapsfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2582: <dc:attribute name="name" value="${name}"/> ingo@2582: </floodmaps> ingo@2582: </dc:if> ingo@2582: </dc:elements> ingo@2582: </dc:context> ingo@2582: </bfg> ingo@2582: <land> ingo@2582: <dc:context> ingo@2582: <dc:statement> ingo@2582: SELECT count(*) as uesg_exist, name as name ingo@2582: FROM floodmaps ingo@2582: WHERE river_id = ${river_id} AND kind = 122 ingo@2582: GROUP BY name, kind ingo@2582: </dc:statement> ingo@2582: <dc:elements> ingo@2582: <dc:if test="$uesg_exist>0"> ingo@2582: <floodmaps> ingo@2582: <dc:attribute name="factory" value="wmsfloodmapsfactory"/> ingo@2683: <dc:attribute name="ids" value="${river_id};${name}"/> ingo@2582: <dc:attribute name="name" value="${name}"/> ingo@2582: </floodmaps> ingo@2582: </dc:if> ingo@2582: </dc:elements> ingo@2582: </dc:context> ingo@2582: </land> ingo@2580: </potentiel> ingo@2580: </calculations> ingo@2580: </uesk> ingo@2580: </dc:macro> ingo@1181: <dc:macro name="flood-map-complete"> ingo@2683: <buildings> ingo@2683: <dc:call-macro name="flood-map-buildings"/> ingo@2683: </buildings> ingo@2683: <catchments> ingo@2683: <dc:call-macro name="flood-map-catchments"/> ingo@2683: </catchments> ingo@2683: <fixpoints> ingo@2683: <dc:call-macro name="flood-map-fixpoints"/> ingo@2683: </fixpoints> ingo@2683: <hydrboundaries> ingo@2683: <dc:call-macro name="flood-map-hydr-boundaries"/> ingo@2683: <dc:call-macro name="flood-map-floodplain"/> ingo@2683: </hydrboundaries> ingo@1181: <kilometrage> ingo@1181: <riveraxis> ingo@1181: <dc:attribute name="factory" value="riveraxis"/> ingo@1181: <dc:attribute name="ids" value="${river_id}"/> ingo@1181: </riveraxis> ingo@1805: <dc:call-macro name="flood-map-km"/> ingo@1836: <dc:call-macro name="flood-map-qps"/> ingo@1181: </kilometrage> aheinecke@5096: <hwslines> aheinecke@5096: <dc:call-macro name="flood-map-hwslines"/> aheinecke@5096: </hwslines> ingo@2595: <dc:call-macro name="flood-map-uesk"/> ingo@2684: <gaugelocations> ingo@2684: <dc:call-macro name="flood-map-gaugelocations"/> ingo@2684: </gaugelocations> ingo@1181: <rastermap> ingo@1181: <background> ingo@1181: <dc:attribute name="factory" value="wmsbackground"/> ingo@1181: <dc:attribute name="ids" value="${river_id}"/> ingo@1181: </background> ingo@1181: </rastermap> ingo@1181: </dc:macro> ingo@1181: </dc:if> raimund@3614: <dc:if test="dc:contains($artifact-outs, 'minfo-heights')"> raimund@3614: <dc:call-macro name="minfo-heights"/> raimund@3614: <dc:macro name="minfo-heights"> raimund@3614: <bedheights> raimund@3614: <dc:call-macro name="bed-heights-single"/> raimund@3614: <dc:call-macro name="bed-heights-epoch"/> raimund@3614: </bedheights> raimund@3614: </dc:macro> raimund@3614: </dc:if> raimund@3614: <dc:if test="dc:contains($artifact-outs, 'minfo-heights-epoch')"> raimund@3614: <bedheights> raimund@3614: <dc:call-macro name="bed-heights-epoch"/> raimund@3614: </bedheights> raimund@3614: </dc:if> raimund@3614: <dc:macro name="bed-heights-single"> raimund@3614: <single> raimund@3614: <dc:context> raimund@3614: <dc:statement> raimund@3614: SELECT id AS bedh_id, raimund@3614: year AS bedh_year, raimund@3614: description AS bedh_descr raimund@3614: FROM bed_height_single WHERE river_id = ${river_id} raimund@3614: </dc:statement> raimund@3614: <dc:elements> raimund@3614: <height> raimund@3614: <dc:attribute name="factory" value="bedheight"/> raimund@3614: <dc:attribute name="ids" value="bedheight-single-${bedh_id}-${bedh_year}"/> raimund@3614: <dc:attribute name="description" value="${bedh_descr}"/> raimund@3614: </height> raimund@3614: </dc:elements> raimund@3614: </dc:context> raimund@3614: </single> raimund@3614: </dc:macro> raimund@3614: <dc:macro name="bed-heights-epoch"> raimund@3614: <epoch> raimund@3614: <dc:context> raimund@3614: <dc:statement> raimund@3614: SELECT id AS bedh_id, raimund@3614: time_interval_id AS bedh_interval_id, raimund@3614: description AS bedh_descr raimund@3614: FROM bed_height_epoch WHERE river_id = ${river_id} raimund@3614: </dc:statement> raimund@3614: <dc:elements> raimund@3614: <height> raimund@3614: <dc:attribute name="factory" value="bedheight"/> raimund@3614: <dc:attribute name="ids" value="bedheight-epoch-${bedh_id}-${bedh_interval_id}"/> raimund@3614: <dc:attribute name="description" value="${bedh_descr}"/> raimund@3614: </height> raimund@3614: </dc:elements> raimund@3614: </dc:context> raimund@3614: </epoch> raimund@3614: </dc:macro> ingo@1181: </river> ingo@1181: </dc:elements> ingo@1181: </dc:context> ingo@1181: </dc:macro> ingo@1181: sascha@1046: <dc:choose> sascha@1046: <dc:comment> sascha@1046: User specific part sascha@1046: ------------------ sascha@1046: </dc:comment> sascha@1046: <dc:when test="dc:contains($parameters, 'user-id')"> ingo@1657: ingo@1657: rrenkert@5015: <old_calculations> rrenkert@5015: <!-- <dc:macro name="load-user">--> rrenkert@5015: <dc:call-macro name="user-range"> rrenkert@5015: <dc:context connection="user"> rrenkert@5015: <dc:comment> rrenkert@5015: Get the user and collection-id. rrenkert@5015: </dc:comment> rrenkert@5015: <dc:statement> felix@1879: SELECT u.id AS user_id, c.id AS collection_id, c.name as collection_name felix@1879: FROM collections c JOIN users u ON c.user_id = u.id felix@1879: WHERE u.gid = CAST(${user-id} AS uuid) felix@1879: ORDER BY c.creation DESC felix@1760: </dc:statement> ingo@1657: rrenkert@5015: rrenkert@5015: <dc:macro name="range-filter"> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT m.id AS a_id, rrenkert@5015: m.state AS a_state, rrenkert@5015: m.gid AS a_gid, rrenkert@5015: m.creation AS a_creation, rrenkert@5015: COALESCE(ld_mode, '') AS ld_m, rrenkert@5015: COALESCE(ld_locations, '') AS ld_l, rrenkert@5015: COALESCE(ld_from, '') AS ld_f, rrenkert@5015: COALESCE(ld_to, '') AS ld_t rrenkert@5015: FROM master_artifacts_range m rrenkert@5015: WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) rrenkert@5015: AND EXISTS ( rrenkert@5015: SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <dc:variable name="from" type="number" expr="dc:fromValue($ld_m, $ld_l, $ld_f)"/> rrenkert@5015: <dc:variable name="to" type="number" expr="dc:toValue($ld_m, $ld_l, $ld_t)"/> rrenkert@5015: <dc:if test="($from >= $fromkm and $from <= $tokm) or ($to <= $tokm and $to >= $fromkm) or ($from <= $fromkm and $to >= $tokm)"> rrenkert@5015: <dc:macro-body/> rrenkert@5015: </dc:if> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:macro> rrenkert@5015: felix@3307: <!-- OFFICIAL LINES --> felix@3307: <dc:if test="dc:contains($artifact-outs, 'longitudinal_section')"> felix@3307: <dc:comment comment=".wst -------------------------------"/> felix@3307: <officiallines> felix@3307: <dc:elements> felix@3307: <dc:context> felix@3307: <dc:statement> rrenkert@5015: SELECT m.id AS a_id, rrenkert@5015: m.state AS a_state, rrenkert@5015: m.gid AS a_gid, rrenkert@5015: m.creation AS a_creation, rrenkert@5015: ardg.v AS gaugy, rrenkert@5015: arv.v AS wqsingle rrenkert@5015: FROM master_artifacts m, rrenkert@5015: artifact_data ardg, rrenkert@5015: artifact_data arv rrenkert@5015: WHERE m.collection_id = ${collection_id} rrenkert@5015: AND m.gid = CAST(${artifact-id} AS uuid) rrenkert@5015: AND ardg.artifact_id = m.id rrenkert@5015: AND ardg.k = 'ld_gaugename' rrenkert@5015: AND arv.artifact_id = m.id rrenkert@5015: AND arv.k = 'wq_single' rrenkert@5015: AND EXISTS ( rrenkert@5015: SELECT id rrenkert@5015: FROM artifact_data ad rrenkert@5015: WHERE ad.artifact_id = m.id rrenkert@5015: AND k = 'river' rrenkert@5015: AND v = ${river}) felix@3307: </dc:statement> felix@3307: <dc:elements> felix@3307: <dc:context connection="system"> felix@3307: <dc:statement> felix@3307: SELECT ol.wst_id AS wstid, ol.wst_column_pos AS wstcolpos, ol.name AS olname, ol.value AS oval felix@3307: FROM official_q_values ol felix@3307: WHERE ol.value = CAST(${wqsingle} AS NUMERIC(10,2)) AND ol.gauge_name = ${gaugy} felix@3307: </dc:statement> felix@3307: <dc:elements> felix@3307: <dc:element name="${olname}"> felix@3307: <dc:attribute name="name" value="${olname}"/> felix@3307: <dc:attribute name="ids" value="additionals-wstv-${wstcolpos}-${wstid}"/> felix@3307: <dc:attribute name="factory" value="staticwkms"/> felix@3307: </dc:element> felix@3307: </dc:elements> felix@3307: </dc:context> felix@3307: </dc:elements> felix@3307: </dc:context> felix@3307: </dc:elements> felix@3307: </officiallines> felix@3307: </dc:if> felix@3570: <!-- END OFFICIAL LINES --> ingo@1657: felix@1879: <dc:comment> felix@1879: SHOW W-DIFFERENCES felix@1879: </dc:comment> ingo@1657: rrenkert@5015: <dc:macro name="differences"> felix@1879: <differences> felix@1879: <dc:elements> felix@1879: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> felix@1879: <dc:context> felix@1879: <dc:statement> felix@1879: SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description felix@1879: FROM outs as o, facets as f, artifacts as a felix@1879: WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} felix@1879: </dc:statement> felix@1879: <dc:elements> felix@1879: <dc:element name="${facet_name}"> felix@1879: <dc:attribute name="description" value="${facet_description}"/> felix@1879: <dc:attribute name="factory" value="winfo"/> felix@1879: <dc:attribute name="artifact-id" value="${aid}"/> felix@1879: <dc:attribute name="ids" value="${aid}"/> felix@1879: <dc:attribute name="out" value="w_differences"/> felix@1879: </dc:element> felix@1879: </dc:elements> felix@1879: </dc:context> rrenkert@5015: </dc:call-macro> felix@1879: </dc:context> felix@1879: </dc:elements> felix@1879: </differences> rrenkert@5015: </dc:macro> ingo@1657: felix@2722: <dc:comment> felix@2722: SHOW REFERENCE CURVE felix@2722: </dc:comment> felix@2722: rrenkert@5015: rrenkert@5015: <dc:macro name="reference-curves"> felix@2722: <reference_curves> felix@2722: <dc:elements> felix@2722: <dc:context> rrenkert@5015: <dc:call-macro name="user-range"> felix@2722: <dc:context> felix@2722: <dc:statement> felix@2722: SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description felix@2722: FROM outs as o, facets as f, artifacts as a felix@2722: WHERE f.name = 'reference_curve' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} felix@2722: </dc:statement> felix@2722: <dc:elements> felix@2722: <dc:element name="${facet_name}"> felix@2722: <dc:attribute name="description" value="${facet_description}"/> felix@2722: <dc:attribute name="factory" value="winfo"/> felix@2722: <dc:attribute name="artifact-id" value="${aid}"/> felix@2722: <dc:attribute name="ids" value="${aid}"/> felix@2722: <dc:attribute name="out" value="reference_curve"/> felix@2722: </dc:element> felix@2722: </dc:elements> felix@2722: </dc:context> rrenkert@5015: </dc:call-macro> felix@2722: </dc:context> felix@2722: </dc:elements> felix@2722: </reference_curves> rrenkert@5015: </dc:macro> felix@2722: felix@2722: <dc:comment> felix@2722: SHOW COMPUTED DISCHARGE CURVES felix@2722: </dc:comment> felix@2722: rrenkert@5015: <dc:macro name="computed-discharge-curve"> felix@1880: <computed_discharge_curves> felix@1880: <dc:elements> felix@1880: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> felix@1880: <dc:context> felix@1880: <dc:statement> felix@1880: SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description felix@1880: FROM outs as o, facets as f, artifacts as a felix@1880: WHERE f.name = 'computed_discharge_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} felix@1880: </dc:statement> felix@1880: <dc:elements> felix@1880: <dc:element name="${facet_name}"> felix@1880: <dc:attribute name="description" value="${facet_description}"/> felix@1880: <dc:attribute name="factory" value="winfo"/> felix@1880: <dc:attribute name="artifact-id" value="${aid}"/> felix@1880: <dc:attribute name="ids" value="${aid}"/> felix@1880: <dc:attribute name="out" value="computed_discharge_curve"/> felix@1880: </dc:element> felix@1880: </dc:elements> felix@1880: </dc:context> rrenkert@5015: </dc:call-macro> felix@1880: </dc:context> felix@1880: </dc:elements> felix@1880: </computed_discharge_curves> rrenkert@5015: </dc:macro> sascha@3219: felix@2736: <dc:comment> felix@2736: CROSS SECTION felix@2736: </dc:comment> felix@2736: rrenkert@5015: rrenkert@5015: <dc:macro name="waterlevels"> felix@2736: <waterlevels> felix@2736: <dc:elements> felix@2736: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> rrenkert@5015: <dc:context> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT id AS out_id rrenkert@5015: FROM outs rrenkert@5015: WHERE artifact_id = ${a_id} AND name = 'cross_section' rrenkert@5015: </dc:statement> rrenkert@5015: <dc:elements> rrenkert@5015: <dc:context> rrenkert@5015: <dc:statement> rrenkert@5015: SELECT name AS facet_name, num as facet_num, description AS facet_description rrenkert@5015: FROM facets rrenkert@5015: WHERE out_id = ${out_id} rrenkert@5015: ORDER BY num ASC, name DESC rrenkert@5015: </dc:statement> rrenkert@5015: <longitudinal_section_columns> felix@2736: <dc:attribute name="description" value="${river} ${a_creation}"/> felix@2736: <dc:elements> felix@2736: <dc:element name="${facet_name}"> felix@2736: <dc:attribute name="description" value="${facet_description}"/> felix@2736: <dc:attribute name="ids" value="${facet_num}"/> felix@2736: <dc:attribute name="factory" value="winfo"/> felix@2736: <dc:attribute name="artifact-id" value="${a_gid}"/> felix@2736: <dc:attribute name="out" value="cross_section"/> felix@2736: </dc:element> felix@2736: </dc:elements> rrenkert@5015: </longitudinal_section_columns> rrenkert@5015: </dc:context> rrenkert@5015: </dc:elements> rrenkert@5015: </dc:context> rrenkert@5015: </dc:call-macro> felix@2736: </dc:context> felix@2736: </dc:elements> felix@2736: </waterlevels> rrenkert@5015: </dc:macro> ingo@1657: ingo@1657: rrenkert@5015: <dc:macro name="longitudinal"> felix@1879: <waterlevels> felix@1879: <dc:elements> felix@1879: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> rrenkert@5015: <dc:context> felix@1879: <dc:statement> felix@1879: SELECT id AS out_id felix@1879: FROM outs felix@1879: WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' felix@1879: </dc:statement> felix@1879: <dc:elements> felix@1879: <dc:context> felix@1879: <dc:statement> felix@1879: SELECT name AS facet_name, num as facet_num, description AS facet_description felix@1879: FROM facets felix@1879: WHERE out_id = ${out_id} felix@1879: ORDER BY num ASC, name DESC felix@1879: </dc:statement> felix@1879: <longitudinal_section_columns> felix@1879: <dc:attribute name="description" value="${river} ${a_creation}"/> felix@1879: <dc:elements> felix@1879: <dc:element name="${facet_name}"> felix@1879: <dc:attribute name="description" value="${facet_description}"/> felix@1879: <dc:attribute name="ids" value="${facet_num}"/> felix@1879: <dc:attribute name="factory" value="winfo"/> felix@1879: <dc:attribute name="artifact-id" value="${a_gid}"/> felix@1879: <dc:attribute name="out" value="longitudinal_section"/> felix@1879: </dc:element> felix@1879: </dc:elements> felix@1879: </longitudinal_section_columns> felix@1879: </dc:context> felix@1879: </dc:elements> felix@1879: </dc:context> rrenkert@5015: </dc:call-macro> felix@1879: </dc:context> felix@1879: </dc:elements> felix@1879: </waterlevels> rrenkert@5015: </dc:macro> ingo@1657: rrenkert@5015: rrenkert@5015: <dc:macro name="longitudinal-section"> felix@3579: <waterlevels> felix@3579: <dc:elements> felix@3579: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> felix@3579: <dc:context> felix@3579: <dc:statement> felix@3579: SELECT id AS out_id felix@3579: FROM outs felix@3579: WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve' felix@3579: </dc:statement> felix@3579: <dc:elements> felix@3579: <dc:context> felix@3579: <!-- average und deviation ls_0 . ls_1 ...--> felix@3579: <dc:statement> felix@3579: SELECT name AS facet_name, num as facet_num, description AS facet_description felix@3579: FROM facets felix@3589: WHERE out_id = ${out_id} AND ( name LIKE 'fix_deviation_ls%' OR name LIKE 'fix_sector_average_ls%' OR name LIKE 'fix_analysis_events_ls%' OR name LIKE 'fix_reference_events_ls%' ) felix@3579: ORDER BY num ASC, name DESC felix@3579: </dc:statement> felix@3579: <waterlevels> felix@3579: <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> felix@3579: <dc:elements> felix@3579: <dc:element name="${facet_name}"> felix@3579: <dc:attribute name="description" value="${facet_description}"/> felix@3579: <dc:attribute name="ids" value="${facet_num}"/> felix@3579: <dc:attribute name="factory" value="fixanalysis"/> felix@3579: <dc:attribute name="artifact-id" value="${a_gid}"/> felix@3579: <dc:attribute name="out" value="fix_longitudinal_section_curve"/> felix@3579: </dc:element> felix@3579: </dc:elements> felix@3579: </waterlevels> felix@3579: </dc:context> felix@3579: </dc:elements> felix@3579: </dc:context> rrenkert@5015: </dc:call-macro> felix@3579: </dc:context> felix@3579: </dc:elements> felix@3579: </waterlevels> rrenkert@5015: </dc:macro> felix@3579: rrenkert@5015: <dc:macro name="delta-wt"> felix@3579: <waterlevels> felix@3579: <dc:elements> felix@3579: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> felix@3579: <dc:context> felix@3579: <dc:statement> felix@3579: SELECT id AS out_id felix@3579: FROM outs felix@3582: WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve' felix@3579: </dc:statement> felix@3579: <dc:elements> felix@3579: <dc:context> felix@3579: <dc:statement> felix@3579: SELECT name AS facet_name, num as facet_num, description AS facet_description felix@3579: FROM facets felix@3590: WHERE out_id = ${out_id} and ( name LIKE 'fix_sector_average_dwt%' OR name LIKE 'fix_deviation_dwt%' OR name = 'fix_analysis_events_dwt' OR name = 'fix_reference_events_dwt' OR name = 'fix_analysis_periods_dwt' ) felix@3579: ORDER BY num ASC, name DESC felix@3579: </dc:statement> felix@3579: <waterlevels> felix@3579: <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> felix@3579: <dc:elements> felix@3579: <dc:element name="${facet_name}"> felix@3579: <dc:attribute name="description" value="${facet_description}"/> felix@3579: <dc:attribute name="ids" value="${facet_num}"/> felix@3582: <dc:attribute name="factory" value="fixanalysis"/> felix@3579: <dc:attribute name="artifact-id" value="${a_gid}"/> felix@3582: <dc:attribute name="out" value="fix_deltawt_curve"/> felix@3579: </dc:element> felix@3579: </dc:elements> felix@3579: </waterlevels> felix@3579: </dc:context> felix@3579: </dc:elements> felix@3579: </dc:context> rrenkert@5015: </dc:call-macro> felix@3579: </dc:context> felix@3579: </dc:elements> felix@3579: </waterlevels> rrenkert@5015: </dc:macro> felix@3579: rrenkert@5015: rrenkert@5015: <dc:macro name="fix-derivate-curve"> felix@3589: <waterlevels> felix@3589: <dc:elements> felix@3589: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> felix@3589: <dc:context> felix@3589: <dc:statement> felix@3589: SELECT id AS out_id felix@3589: FROM outs felix@3589: WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve' felix@3589: </dc:statement> felix@3589: <dc:elements> felix@3589: <dc:context> felix@3589: <dc:statement> felix@3589: SELECT name AS facet_name, num as facet_num, description AS facet_description felix@3589: FROM facets felix@4165: WHERE out_id = ${out_id} and name = 'fix_derivate_curve' felix@3589: ORDER BY num ASC, name DESC felix@3589: </dc:statement> felix@3589: <waterlevels> felix@3589: <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> felix@3589: <dc:elements> felix@3589: <dc:element name="${facet_name}"> felix@3589: <dc:attribute name="description" value="${facet_description}"/> felix@3589: <dc:attribute name="ids" value="${facet_num}"/> felix@3589: <dc:attribute name="factory" value="fixanalysis"/> felix@3589: <dc:attribute name="artifact-id" value="${a_gid}"/> felix@3589: <dc:attribute name="out" value="fix_derivate_curve"/> felix@3589: </dc:element> felix@3589: </dc:elements> felix@3589: </waterlevels> felix@3589: </dc:context> felix@3589: </dc:elements> felix@3589: </dc:context> rrenkert@5015: </dc:call-macro> felix@3589: </dc:context> felix@3589: </dc:elements> felix@3589: </waterlevels> rrenkert@5015: </dc:macro> felix@3589: rrenkert@5015: rrenkert@5015: <dc:macro name="fix-wq-curve"> felix@3579: <waterlevels> felix@3579: <dc:elements> felix@3579: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> felix@3579: <dc:context> felix@3579: <dc:statement> felix@3579: SELECT id AS out_id felix@3579: FROM outs felix@3583: WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve' felix@3579: </dc:statement> felix@3579: <dc:elements> felix@3579: <dc:context> felix@3579: <dc:statement> felix@3579: SELECT name AS facet_name, num as facet_num, description AS facet_description felix@3579: FROM facets felix@3588: WHERE out_id = ${out_id} and ( name LIKE 'fix_sector_average_wq%' OR name = 'fix_wq_curve' OR name LIKE 'fix_analysis_events_wq%' OR name LIKE 'fix_reference_events_wq%' ) felix@3579: ORDER BY num ASC, name DESC felix@3579: </dc:statement> felix@3579: <waterlevels> felix@3579: <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> felix@3579: <dc:elements> felix@3579: <dc:element name="${facet_name}"> felix@3579: <dc:attribute name="description" value="${facet_description}"/> felix@3579: <dc:attribute name="ids" value="${facet_num}"/> felix@3583: <dc:attribute name="factory" value="fixanalysis"/> felix@3579: <dc:attribute name="artifact-id" value="${a_gid}"/> felix@3583: <dc:attribute name="out" value="fix_wq_curve"/> felix@3579: </dc:element> felix@3579: </dc:elements> felix@3579: </waterlevels> felix@3579: </dc:context> felix@3579: </dc:elements> felix@3579: </dc:context> rrenkert@5015: </dc:call-macro> felix@3579: </dc:context> felix@3579: </dc:elements> felix@3579: </waterlevels> rrenkert@5015: </dc:macro> felix@3579: rrenkert@5015: rrenkert@5015: <dc:macro name="duration-curve"> felix@2690: <computed_discharge_curves> felix@2690: <dc:elements> felix@2690: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> felix@2690: <dc:context> felix@2690: <dc:statement> felix@2690: SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description felix@2690: FROM outs as o, facets as f, artifacts as a felix@2717: WHERE (f.name = 'duration_curve.q' or f.name = 'duration_curve.w') and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} felix@2690: </dc:statement> felix@2690: <dc:elements> felix@2690: <dc:element name="${facet_name}"> felix@2690: <dc:attribute name="description" value="${facet_description}"/> felix@2690: <dc:attribute name="factory" value="winfo"/> felix@2690: <dc:attribute name="artifact-id" value="${aid}"/> felix@2690: <dc:attribute name="ids" value="${aid}"/> felix@2690: <dc:attribute name="out" value="duration_curve"/> felix@2690: </dc:element> felix@2690: </dc:elements> felix@2690: </dc:context> rrenkert@5015: </dc:call-macro> felix@2690: </dc:context> felix@2690: </dc:elements> felix@2690: </computed_discharge_curves> rrenkert@5015: </dc:macro> rrenkert@5015: felix@1879: <dc:comment> felix@1879: WATERLEVELS - ONLY SHOW Ws felix@1879: </dc:comment> felix@1879: felix@3589: <!-- TODO doesnt work nicely for fix/wq-diags. --> rrenkert@5015: rrenkert@5145: <dc:macro name="waterlevels-fix"> felix@1879: <waterlevels> felix@1879: <dc:elements> felix@1879: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> felix@1879: <dc:context> felix@1879: <dc:statement> felix@1879: SELECT id AS out_id felix@1879: FROM outs felix@1879: WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' felix@1879: </dc:statement> felix@1879: <dc:elements> felix@1879: <dc:context> felix@1879: <dc:statement> felix@1879: SELECT name AS facet_name, num as facet_num, description AS facet_description felix@1879: FROM facets felix@1879: WHERE out_id = ${out_id} and name = 'longitudinal_section.w' felix@1879: ORDER BY num ASC, name DESC felix@1879: </dc:statement> felix@1879: <waterlevels> felix@1879: <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> felix@1879: <dc:elements> felix@1879: <dc:element name="${facet_name}"> felix@1879: <dc:attribute name="description" value="${facet_description}"/> felix@1879: <dc:attribute name="ids" value="${facet_num}"/> felix@1879: <dc:attribute name="factory" value="winfo"/> felix@1879: <dc:attribute name="artifact-id" value="${a_gid}"/> felix@1879: <dc:attribute name="out" value="longitudinal_section"/> felix@1879: </dc:element> felix@1879: </dc:elements> felix@1879: </waterlevels> felix@1879: </dc:context> felix@1879: </dc:elements> felix@1879: </dc:context> rrenkert@5015: </dc:call-macro> felix@1879: </dc:context> felix@1879: </dc:elements> felix@1879: </waterlevels> rrenkert@5015: </dc:macro> felix@1879: ingo@2096: <dc:comment> ingo@2096: SHOW FLOODMAPS ingo@2096: </dc:comment> ingo@2096: rrenkert@5015: rrenkert@5015: <dc:macro name="flood-map"> ingo@2096: <floodmap> ingo@2096: <dc:elements> ingo@2096: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> ingo@2096: <dc:context> ingo@2096: <dc:statement> ingo@2096: SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description ingo@2096: FROM outs as o, facets as f, artifacts as a ingo@2096: WHERE f.name = 'floodmap.wsplgen' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} ingo@2096: </dc:statement> ingo@2096: <dc:elements> ingo@2096: <dc:element name="${facet_name}"> ingo@2096: <dc:attribute name="description" value="${facet_description}"/> ingo@2096: <dc:attribute name="factory" value="winfo"/> ingo@2096: <dc:attribute name="artifact-id" value="${aid}"/> ingo@2096: <dc:attribute name="ids" value="${aid}"/> ingo@2096: <dc:attribute name="out" value="floodmap"/> ingo@2096: </dc:element> ingo@2096: </dc:elements> ingo@2096: </dc:context> rrenkert@5015: </dc:call-macro> ingo@2096: </dc:context> ingo@2096: </dc:elements> ingo@2096: </floodmap> rrenkert@5015: </dc:macro> ingo@2096: bjoern@4379: <dc:comment> bjoern@4379: MINFO bedheight difference bjoern@4379: </dc:comment> bjoern@4379: rrenkert@5015: <dc:macro name="bed-difference"> bjoern@4379: <fix_longitudinal_section_curve> bjoern@4379: <dc:elements> bjoern@4379: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> bjoern@4379: <dc:context> bjoern@4379: <dc:statement> bjoern@4379: SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description bjoern@4379: FROM outs as o, facets as f, artifacts as a bjoern@4379: WHERE (f.name = 'fix_sector_average_ls_0' or f.name = 'fix_sector_average_ls_1' or f.name = 'fix_sector_average_ls_2' bjoern@4379: or f.name = 'fix_sector_average_ls_3' or f.name = 'fix_analysis_events_ls' or f.name = 'fix_reference_events_ls') bjoern@4379: and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} bjoern@4379: </dc:statement> bjoern@4379: <fix_longitudinal_section_curve> bjoern@4379: <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> bjoern@4379: <dc:elements> bjoern@4379: <dc:element name="${facet_name}"> bjoern@4379: <dc:attribute name="description" value="${facet_description}"/> bjoern@4379: <dc:attribute name="factory" value="fixanalysis"/> bjoern@4379: <dc:attribute name="artifact-id" value="${aid}"/> bjoern@4379: <dc:attribute name="ids" value="${facet_num}"/> bjoern@4379: <dc:attribute name="out" value="fix_longitudinal_section_curve"/> bjoern@4379: </dc:element> bjoern@4379: </dc:elements> bjoern@4379: </fix_longitudinal_section_curve> bjoern@4379: </dc:context> rrenkert@5015: </dc:call-macro> bjoern@4379: </dc:context> bjoern@4379: </dc:elements> bjoern@4379: </fix_longitudinal_section_curve> rrenkert@5015: </dc:macro> bjoern@4379: bjoern@4538: <dc:comment> bjoern@4538: MINFO bedheight middle bjoern@4538: </dc:comment> bjoern@4538: rrenkert@5015: <dc:macro name="bed-height"> bjoern@4449: <fix_vollmer_wq_curve> bjoern@4449: <dc:elements> bjoern@4449: <dc:context> rrenkert@5015: <dc:call-macro name="range-filter"> bjoern@4449: <dc:context> bjoern@4449: <dc:statement> bjoern@4449: SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description bjoern@4449: FROM outs as o, facets as f, artifacts as a bjoern@4449: WHERE (f.name = 'longitudinal_section.w' or f.name = 'heightmarks_points') bjoern@4449: and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} bjoern@4449: </dc:statement> bjoern@4449: <fix_vollmer_wq_curve> bjoern@4449: <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> bjoern@4449: <dc:elements> bjoern@4449: <dc:element name="${facet_name}"> bjoern@4449: <dc:attribute name="description" value="${facet_description}"/> bjoern@4449: <dc:attribute name="factory" value="fixanalysis"/> bjoern@4449: <dc:attribute name="artifact-id" value="${aid}"/> bjoern@4449: <dc:attribute name="ids" value="${facet_num}"/> bjoern@4449: <dc:attribute name="out" value="longitudinal_section"/> bjoern@4449: </dc:element> bjoern@4449: </dc:elements> bjoern@4449: </fix_vollmer_wq_curve> bjoern@4449: </dc:context> rrenkert@5015: </dc:call-macro> bjoern@4449: </dc:context> bjoern@4449: </dc:elements> bjoern@4449: </fix_vollmer_wq_curve> rrenkert@5015: </dc:macro> rrenkert@5015: rrenkert@5312: <dc:macro name="floodmap-hws-user"> rrenkert@5312: <dc:context> rrenkert@5312: <dc:statement> rrenkert@5312: SELECT id AS out_id rrenkert@5312: FROM outs rrenkert@5312: WHERE artifact_id = ${a_id} AND name = 'floodmap' rrenkert@5312: </dc:statement> rrenkert@5312: <dc:elements> rrenkert@5312: <dc:context> rrenkert@5312: <dc:statement> rrenkert@5312: SELECT name AS facet_name, num as facet_num, description AS facet_description rrenkert@5312: FROM facets rrenkert@5312: WHERE out_id = ${out_id} and name = 'floodmap.usershape' rrenkert@5312: ORDER BY num ASC, name DESC rrenkert@5312: </dc:statement> rrenkert@5312: <own-hws> rrenkert@5312: <dc:elements> rrenkert@5312: <dc:element name="${facet_name}"> rrenkert@5312: <dc:attribute name="description" value="${facet_description}"/> rrenkert@5312: <dc:attribute name="ids" value="${facet_num}"/> rrenkert@5312: <dc:attribute name="factory" value="winfo"/> rrenkert@5312: <dc:attribute name="artifact-id" value="${a_gid}"/> rrenkert@5312: <dc:attribute name="out" value="floodmap"/> rrenkert@5312: </dc:element> rrenkert@5312: </dc:elements> rrenkert@5312: </own-hws> rrenkert@5312: </dc:context> rrenkert@5312: </dc:elements> rrenkert@5312: </dc:context> rrenkert@5312: </dc:macro> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'discharge_longitudinal_section') or (dc:contains($artifact-outs, 'w_differences')))"> rrenkert@5015: <dc:call-macro name="longitudinal"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'fix_deltawt_curve')"> rrenkert@5015: <dc:call-macro name="delta-wt"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'longitudinal_section') or (dc:contains($artifact-outs, 'w_differences') or (dc:contains($artifact-outs, 'discharge_longitudinal_section')))"> rrenkert@5015: <dc:call-macro name="differences"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'reference_curve')"> rrenkert@5015: <dc:call-macro name="reference-curves"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'computed_discharge_curve')"> rrenkert@5015: <dc:call-macro name="computed-discharge-curve"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'cross_section')"> rrenkert@5015: <dc:call-macro name="waterlevels"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> rrenkert@5015: <dc:call-macro name="longitudinal-section"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'fix_derivate_curve')"> rrenkert@5015: <dc:call-macro name="fix-derivate-curve"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> rrenkert@5015: <dc:call-macro name="fix-wq-curve"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> rrenkert@5015: <dc:call-macro name="duration-curve"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'waterlevels') or (dc:contains($artifact-outs, 'fix_wq_curve'))"> rrenkert@5015: <dc:call-macro name="waterlevels-fix"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'floodmap') or dc:contains($artifact-outs, 'map')"> rrenkert@5015: <dc:call-macro name="flood-map"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'bed_difference_year') or dc:contains($artifact-outs, 'bed_difference_height_year')"> rrenkert@5015: <dc:call-macro name="bed-difference"/> rrenkert@5015: </dc:if> rrenkert@5015: <dc:if test="dc:contains($artifact-outs, 'bedheight_middle')"> rrenkert@5015: <dc:call-macro name="bed-height"/> bjoern@4449: </dc:if> rrenkert@5312: <dc:if test="dc:contains($artifact-outs, 'floodmap-hws')"> rrenkert@5312: <dc:call-macro name="floodmap-hws-user"/> rrenkert@5312: </dc:if> felix@1879: </dc:context> rrenkert@5015: </dc:call-macro> rrenkert@5015: sascha@1046: </old_calculations> ingo@1657: ingo@1657: ingo@1181: <dc:comment> ingo@1657: Include System specific part when 'load-system' is in parameters. ingo@1657: ----------------------------------------------------------------- ingo@1181: </dc:comment> ingo@1657: <dc:choose> ingo@1657: <dc:when test="dc:contains($parameters,'load-system')"> ingo@1657: <dc:call-macro name="load-system"/> ingo@1657: </dc:when> ingo@1657: </dc:choose> sascha@1046: </dc:when> ingo@1657: ingo@1657: sascha@1046: <dc:comment> ingo@1657: Include System specific part only if no user ID is given. ingo@1657: --------------------------------------------------------- sascha@1046: </dc:comment> sascha@1046: <dc:otherwise> ingo@1181: <dc:call-macro name="load-system"/> sascha@1046: </dc:otherwise> sascha@1046: </dc:choose> sascha@1046: </datacage> sascha@1046: </dc:template>