teichmann@5523: sascha@1046: aheinecke@6053: rrenkert@5015: aheinecke@6053: aheinecke@6053: User specific part aheinecke@6053: ------------------ aheinecke@6183: This is a hack because we currently have no way to supress empty aheinecke@6183: folders (either in the client or in the datacage). aheinecke@6053: aheinecke@6183: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@5015: aheinecke@6053: SELECT id AS river_id, name AS river_name aheinecke@6053: FROM rivers aheinecke@6053: WHERE lower(name) LIKE lower(${river}) rrenkert@5015: teichmann@5522: aheinecke@6053: teichmann@5522: aheinecke@6053: aheinecke@6053: felix@3283: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@4014: aheinecke@6053: aheinecke@6653: Generate system content with variables: {dc:dump-variables()} aheinecke@6183: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: Recommendations (client shall load immediately). aheinecke@6053: aheinecke@6053: aheinecke@6653: Rec out iteration for: {$out} aheinecke@6053: tom@6638: tom@6638: tom@6638: tom@6638: aheinecke@6053: rrenkert@6456: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@6495: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7624: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7624: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@6456: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@6743: felix@6743: felix@6743: aheinecke@6053: aheinecke@6053: felix@6565: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@6565: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@6638: tom@6638: tom@6638: tom@7664: tom@7664: tom@7664: tom@7664: tom@7664: tom@7664: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7303: Non - Recommendations (offered to user to choose additional data from). aheinecke@6053: aheinecke@6053: aheinecke@6653: Non Rec out iteration for: {$out} aheinecke@6053: rrenkert@7961: rrenkert@7961: rrenkert@7961: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@6075: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@6638: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6691: felix@7265: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6053: felix@7265: felix@7276: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7265: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@6439: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@6638: felix@7233: aheinecke@6053: aheinecke@6053: felix@7231: aheinecke@6053: tom@6638: felix@7232: aheinecke@6053: tom@6638: felix@7229: aheinecke@6053: tom@6638: felix@7230: aheinecke@6277: tom@6638: felix@7230: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7265: felix@7276: felix@7276: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: aheinecke@6081: felix@7572: felix@7572: felix@7572: felix@7675: felix@7572: felix@7572: aheinecke@6081: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@5015: aheinecke@6053: aheinecke@7347: Generate user content with variables: {dc:dump-variables()} aheinecke@6183: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: Recommendations (user) aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: felix@7303: Non Recommendations (user) - offer to load other projects aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: felix@7332: aheinecke@6095: aheinecke@6095: felix@7413: aheinecke@6095: tom@6638: felix@7413: aheinecke@6095: felix@7266: felix@7266: felix@7267: felix@7267: felix@7267: felix@7266: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: tom@7428: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6644: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: felix@6581: felix@7435: felix@7435: felix@7435: felix@7435: felix@7435: felix@6581: aheinecke@6095: felix@7435: felix@7435: felix@7435: felix@7435: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: tom@6638: teichmann@7419: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: tom@6638: teichmann@7419: aheinecke@6095: aheinecke@6095: teichmann@7419: aheinecke@6095: tom@6638: teichmann@7419: aheinecke@6095: tom@6638: teichmann@7419: aheinecke@6095: felix@7467: felix@7467: felix@7467: felix@7575: felix@7575: felix@7575: felix@7576: felix@7576: felix@7576: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6081: aheinecke@6053: aheinecke@6053: felix@4455: aheinecke@6053: rrenkert@5631: felix@7575: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7576: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: felix@7575: aheinecke@6110: rrenkert@7795: aheinecke@6053: aheinecke@6110: felix@7418: felix@7408: felix@7408: rrenkert@7795: rrenkert@7795: rrenkert@7795: rrenkert@7795: rrenkert@7795: rrenkert@7795: rrenkert@7795: rrenkert@7795: felix@7408: felix@7408: felix@7418: aheinecke@6110: aheinecke@6053: aheinecke@6110: aheinecke@6053: aheinecke@5976: aheinecke@6053: felix@7457: aheinecke@6111: aheinecke@6111: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: felix@7457: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6053: aheinecke@6053: aheinecke@6691: aheinecke@6717: aheinecke@6849: aheinecke@6691: aheinecke@6691: aheinecke@6691: SELECT g.id AS gauge_id, felix@7423: g.name AS gauge_name, felix@7423: dt.id AS dt_id, felix@7423: t.start_time AS start_time, felix@7423: t.stop_time AS stop_time, felix@7423: dt.bfg_id AS bfg_id aheinecke@6691: FROM gauges g aheinecke@6691: JOIN discharge_tables dt ON g.id = dt.gauge_id aheinecke@6691: LEFT JOIN time_intervals t ON dt.time_interval_id = t.id aheinecke@6691: WHERE g.river_id = ${river_id} felix@7423: AND dt.kind <> 0 felix@7423: AND ((g.station = ${fromkm} AND g.station = ${tokm}) felix@7423: OR g.official_number = ${refgauge}) aheinecke@6691: ORDER BY start_time aheinecke@6691: aheinecke@6111: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6691: aheinecke@6111: aheinecke@6691: aheinecke@6053: aheinecke@6053: aheinecke@6691: aheinecke@6053: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6654: aheinecke@6111: aheinecke@6237: aheinecke@6111: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: aheinecke@6654: aheinecke@6111: Aheinecke: Why is this grouping different from the rest? aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6053: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: felix@7418: felix@7418: felix@7418: felix@7418: felix@7418: felix@7418: aheinecke@6053: felix@7492: aheinecke@6053: felix@7332: felix@7418: aheinecke@6111: Aheinecke: Why is this grouping different from the rest? aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: felix@7418: felix@7332: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7491: felix@7332: aheinecke@6111: aheinecke@6053: felix@7332: felix@7418: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: felix@7491: aheinecke@6111: aheinecke@6111: aheinecke@6111: felix@7418: felix@7332: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6111: aheinecke@6053: aheinecke@6053: felix@7418: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: felix@7418: aheinecke@6053: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6111: aheinecke@6053: aheinecke@6053: felix@7418: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: felix@7418: aheinecke@6053: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6111: aheinecke@6053: aheinecke@6053: felix@7418: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: felix@7418: aheinecke@6053: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: felix@7267: felix@7267: felix@7267: felix@7267: tom@7269: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7424: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7267: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: felix@7264: aheinecke@6053: aheinecke@6111: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6111: aheinecke@6053: aheinecke@6053: aheinecke@6111: TODO doesnt work nicely for fix/wq-diags. Aheinecke (27.5.2013): Why? aheinecke@6053: aheinecke@6324: aheinecke@6111: aheinecke@6111: felix@7420: aheinecke@6111: aheinecke@6095: aheinecke@6324: aheinecke@6324: aheinecke@6324: aheinecke@6324: aheinecke@6324: aheinecke@6324: aheinecke@6324: aheinecke@6324: aheinecke@6095: aheinecke@6279: aheinecke@6095: aheinecke@6095: aheinecke@6124: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: felix@7420: aheinecke@6111: aheinecke@6111: aheinecke@6095: aheinecke@6053: aheinecke@6053: felix@6581: felix@6581: felix@6615: felix@6615: No diffs between beddiffs and others, for now. felix@6615: felix@6615: felix@6615: felix@6615: felix@6587: felix@6649: felix@6581: felix@6587: felix@7420: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6587: felix@6587: felix@6587: felix@6587: felix@6587: felix@6587: felix@6587: felix@6587: felix@6581: felix@6581: felix@7420: felix@6587: felix@6587: felix@6587: felix@6587: felix@6587: felix@6581: felix@7420: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6587: felix@6587: felix@6587: felix@6587: felix@6587: felix@6587: felix@6587: felix@6587: felix@6581: felix@6581: felix@7420: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: felix@6581: aheinecke@6053: aheinecke@6111: No grouping in this? aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6095: aheinecke@6053: aheinecke@6053: felix@7443: aheinecke@6111: aheinecke@6053: felix@7443: felix@7420: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@7177: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6053: felix@7420: felix@7443: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@6638: aheinecke@6053: felix@7441: felix@7418: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: felix@7470: aheinecke@7177: tom@6638: aheinecke@6111: aheinecke@6111: aheinecke@6053: felix@7418: felix@7441: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@6638: aheinecke@6053: felix@7441: felix@7418: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: felix@7662: felix@7662: felix@7662: felix@7662: aheinecke@7177: tom@6638: aheinecke@6111: aheinecke@6111: aheinecke@6053: felix@7418: felix@7441: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: felix@6595: rrenkert@7923: aheinecke@6053: felix@6595: felix@7418: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: felix@6615: felix@6572: felix@6589: aheinecke@6111: aheinecke@6111: aheinecke@6053: felix@7418: felix@6595: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: felix@7418: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: felix@7418: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@7348: aheinecke@6053: felix@7426: aheinecke@6053: felix@7332: felix@7418: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6111: aheinecke@6124: aheinecke@6111: aheinecke@6111: aheinecke@7177: felix@7407: aheinecke@6111: aheinecke@6111: aheinecke@6053: felix@7418: felix@7332: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: cs.id AS prot_id, aheinecke@6053: cs.description AS prot_description aheinecke@6053: FROM cross_sections cs aheinecke@6053: JOIN cross_section_lines csl ON csl.cross_section_id = cs.id aheinecke@6053: WHERE cs.river_id = ${river_id} aheinecke@6053: AND csl.km BETWEEN ${fromkm} AND ${tokm} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: h.id AS hyk_id, aheinecke@6053: h.description AS hyk_description aheinecke@6053: FROM hyks h aheinecke@6053: JOIN hyk_entries he ON he.hyk_id = h.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND he.km BETWEEN ${fromkm} AND ${tokm} aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6081: aheinecke@6084: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6081: aheinecke@6084: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7265: felix@7265: felix@7265: felix@7265: felix@7621: felix@7265: felix@7265: felix@7265: felix@7265: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7421: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7171: felix@7329: felix@7329: felix@7329: felix@7329: felix@7190: felix@7209: felix@7218: felix@7229: felix@7218: rrenkert@7851: felix@7474: felix@7474: felix@7474: felix@7474: felix@7171: aheinecke@6053: aheinecke@6053: felix@7333: teichmann@7419: WINFO/DIFF/FIX teichmann@7419: teichmann@7419: teichmann@7419: teichmann@7419: felix@7491: teichmann@7419: MINFO teichmann@7419: felix@7443: teichmann@7419: teichmann@7419: felix@7333: felix@7333: rrenkert@7851: rrenkert@7851: rrenkert@7851: rrenkert@7851: rrenkert@7851: SELECT DISTINCT rrenkert@7851: p.id AS pid, rrenkert@7851: p.description AS description, rrenkert@7851: d.lower AS depth_lower, tom@7905: d.upper AS depth_upper, tom@7905: p.description || '<BR>' || tom@7905: 'Tiefe: ' || d.lower || ' - ' || d.upper tom@7905: || ' cm <BR>' || tom@7905: 'Zeitraum: ' || t.start_time || ' - ' || t.stop_time tom@7905: AS info rrenkert@7851: FROM porosity p rrenkert@7851: JOIN depths d ON p.depth_id = d.id tom@7905: JOIN time_intervals t ON p.time_interval_id=t.id rrenkert@7851: WHERE p.river_id = ${river_id} rrenkert@7851: ORDER BY depth_lower, depth_upper rrenkert@7851: rrenkert@7851: rrenkert@7851: rrenkert@7851: rrenkert@7851: rrenkert@7851: rrenkert@7851: rrenkert@7851: rrenkert@7851: felix@7333: felix@7208: felix@7208: felix@7208: felix@7208: felix@7208: SELECT DISTINCT felix@7208: sd.id AS sdid, felix@7208: sd.description AS description, felix@7208: d.lower AS depth_lower, felix@7451: d.upper AS depth_upper, felix@7451: min(sdv.year) AS year felix@7208: FROM sediment_density sd felix@7208: JOIN depths d ON sd.depth_id = d.id felix@7451: JOIN sediment_density_values sdv on sdv.sediment_density_id = sd.id felix@7450: WHERE sd.river_id = ${river_id} felix@7451: GROUP BY sd.id, sd.description, d.upper, d.lower felix@7451: ORDER BY year, depth_lower, depth_upper felix@7208: felix@7208: felix@7208: felix@7429: felix@7208: felix@7208: felix@7208: felix@7208: felix@7208: felix@7208: felix@7277: felix@7277: felix@7277: felix@7277: felix@7277: felix@7277: felix@7278: felix@7279: felix@7279: felix@7279: felix@7280: felix@7294: felix@7279: felix@7279: felix@7279: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7280: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7280: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7280: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7280: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7280: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7278: felix@7280: felix@7278: felix@7278: felix@7278: felix@7359: felix@7359: felix@7359: felix@7359: felix@7359: felix@7359: felix@7359: felix@7278: felix@7278: felix@7277: felix@7190: felix@7191: tom@7665: felix@7191: felix@7190: felix@7190: felix@7190: SELECT DISTINCT felix@7278: sy.id AS syid, felix@7190: sy.description AS description, felix@7223: ti.start_time AS year, felix@7223: gf.name AS fraction felix@7190: FROM sediment_yield sy felix@7190: JOIN rivers r ON sy.river_id = r.id felix@7190: JOIN sediment_yield_values syv ON sy.id = syv.sediment_yield_id felix@7190: JOIN time_intervals ti ON sy.time_interval_id = ti.id felix@7223: JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id felix@7195: WHERE r.id = ${river_id} felix@7190: AND ti.stop_time IS NULL felix@7190: AND syv.station BETWEEN ${fromkm} AND ${tokm} tom@7666: ORDER BY fraction, year DESC felix@7190: felix@7280: felix@7280: felix@7280: felix@7190: felix@7191: felix@7191: felix@7191: felix@7191: felix@7191: SELECT DISTINCT felix@7278: sy.id AS syid, felix@7191: sy.description AS description, felix@7279: ti.start_time AS startyear, felix@7279: ti.stop_time AS endyear, felix@7278: gf.name AS fraction felix@7191: FROM sediment_yield sy felix@7191: JOIN rivers r ON sy.river_id = r.id felix@7191: JOIN sediment_yield_values syv ON sy.id = syv.sediment_yield_id felix@7191: JOIN time_intervals ti ON sy.time_interval_id = ti.id felix@7278: JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id felix@7195: WHERE r.id = ${river_id} felix@7191: AND ti.stop_time IS NOT NULL felix@7191: AND syv.station BETWEEN ${fromkm} AND ${tokm} tom@7666: ORDER BY fraction, startyear DESC, endyear DESC felix@7191: felix@7280: felix@7280: felix@7280: felix@7191: felix@7191: felix@7191: felix@7190: felix@7190: felix@7190: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: SELECT id AS anno_id, aheinecke@6053: name AS anno_description aheinecke@6053: FROM annotation_types aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@7665: tom@7665: tom@7665: tom@7665: tom@7665: SELECT id AS anno_id, tom@7665: name AS anno_description tom@7665: FROM annotation_types tom@7912: WHERE name LIKE 'Quelle%' OR name LIKE 'Senke%' tom@7665: tom@7665: tom@7665: tom@7665: tom@7665: tom@7665: tom@7665: tom@7665: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7171: felix@7171: felix@7171: felix@7171: felix@7171: tom@7173: felix@7171: felix@7171: felix@7171: felix@7171: felix@7171: felix@7171: felix@7171: felix@7171: felix@7171: felix@7171: felix@7171: felix@7171: rrenkert@6226: rrenkert@6226: rrenkert@6226: rrenkert@6226: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: tom@7174: rrenkert@6226: rrenkert@6226: rrenkert@6226: rrenkert@6226: rrenkert@6226: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6690: SELECT g.id AS gauge_id, aheinecke@6717: g.name AS gauge_name, aheinecke@6717: t.start_time AS start_time, aheinecke@6717: t.stop_time AS stop_time aheinecke@6690: FROM gauges g aheinecke@6717: JOIN discharge_tables dt ON g.id = dt.gauge_id aheinecke@6717: LEFT JOIN time_intervals t ON dt.time_interval_id = t.id aheinecke@6690: WHERE g.river_id = ${river_id} aheinecke@6717: AND dt.kind = 0 aheinecke@6849: AND ((g.station = ${fromkm} AND g.station = ${tokm}) aheinecke@6849: OR g.official_number = ${refgauge}) aheinecke@6053: aheinecke@6053: aheinecke@6851: aheinecke@6851: aheinecke@6851: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@7961: rrenkert@7961: blablub rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: WITH sta rrenkert@7961: AS (SELECT bhs.id, rrenkert@7961: bhs.description, rrenkert@7961: bhsv.station, rrenkert@7961: bhs.year rrenkert@7961: FROM bed_height_single bhs rrenkert@7961: JOIN bed_height_single_values bhsv rrenkert@7961: ON bhsv.bed_height_single_id = bhs.id rrenkert@7961: WHERE bhs.river_id = ${river_id} rrenkert@7961: AND bhs.year BETWEEN ${year_from} AND ${year_to}), rrenkert@7961: csta rrenkert@7961: AS (SELECT b1.id AS id1, rrenkert@7961: b1.description AS b1desc, rrenkert@7961: b1.year AS b1year, rrenkert@7961: b2.id AS id2, rrenkert@7961: b2.description AS b2desv, rrenkert@7961: b2.year AS b2year rrenkert@7961: FROM sta b1 rrenkert@7961: JOIN sta b2 rrenkert@7961: ON b1.station = b2.station rrenkert@7961: AND b1.id < b2.id) rrenkert@7961: SELECT id1, b1desc, b1year, rrenkert@7961: id2, b2desc, b2year rrenkert@7961: FROM csta rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: teichmann@7963: rrenkert@7961: rrenkert@7961: TODO: Better structure rrenkert@7961: rrenkert@7961: A - B rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: B - A rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: aheinecke@6053: teichmann@7947: teichmann@7947: teichmann@7947: teichmann@7947: teichmann@7947: teichmann@7947: teichmann@7947: teichmann@7947: teichmann@7947: teichmann@7411: aheinecke@7406: The input here is a list differenc ids noted in the aheinecke@7406: form: aheinecke@7406: [2726deb8-e71f-4acc-bc57-c7ae6062df2e;bedheight;0;FP-Mai2006vHW]# aheinecke@7406: [df79ba16-7e2a-43d6-b15b-34dca1fd9bff;bedheight;0;FP-2007_0-286]# aheinecke@7406: [027ba0ac-5453-4e63-a99b-1feeb82a4e06;bedheight;0;QP-2002nHW]# aheinecke@7406: [26b9b6eb-1ce5-4011-83c7-b88e15e99870;bedheight;0;FP-Nov2008] aheinecke@7406: aheinecke@7406: (Linebreaks inserted for readability) aheinecke@7406: aheinecke@7406: We take this string and look for all 4 digit numbers (\d{4}) after aheinecke@7406: we have removed the uuids from the input string (dc:replace all). aheinecke@7406: On this list of numbers we use the dc:min/max-number functions to aheinecke@7406: get the extreme values and interpret the result as a number. aheinecke@7406: aheinecke@7427: aheinecke@7427: aheinecke@7427: teichmann@7549: teichmann@7549: teichmann@7549: aheinecke@7427: teichmann@7549: teichmann@7549: teichmann@7549: aheinecke@7427: aheinecke@7427: aheinecke@7427: Just show everything aheinecke@7427: aheinecke@7427: aheinecke@7427: aheinecke@7427: teichmann@7947: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7327: SELECT bhs.id AS bedh_id, felix@7327: bhs.year AS bedh_year, felix@7327: bhs.description AS bedh_descr, felix@7330: bht.name AS type_name felix@7327: FROM bed_height_single bhs felix@7327: JOIN bed_height_type bht ON bht.id = bhs.type_id felix@7327: WHERE bhs.river_id = ${river_id} aheinecke@7405: AND lower(bhs.description) NOT LIKE '%epoch%' aheinecke@7405: AND bhs.year BETWEEN ${year_from} AND ${year_to} aheinecke@6053: felix@7327: felix@7327: felix@7327: felix@7327: felix@7330: felix@7327: felix@7327: felix@7327: felix@7330: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@6214: SELECT id AS bedh_id, rrenkert@6214: year AS bedh_year, rrenkert@6214: description AS bedh_descr rrenkert@6214: FROM bed_height_single rrenkert@6214: WHERE river_id = ${river_id} rrenkert@6214: AND lower(description) LIKE '%epoch%' aheinecke@7405: AND year BETWEEN ${year_from} AND ${year_to} aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7292: felix@7292: felix@7292: felix@7421: SELECT fvm.id AS fvmid, felix@7421: fvm.description AS fvmd, felix@7402: dz.upper_discharge AS upperQ, felix@7402: dz.lower_discharge AS lowerQ felix@7292: FROM flow_velocity_model fvm felix@7292: JOIN discharge_zone dz ON dz.id = fvm.discharge_zone_id felix@7292: WHERE dz.river_id = ${river_id} felix@7409: ORDER BY dz.value felix@7292: felix@7292: felix@7292: felix@7292: felix@7402: felix@7292: felix@7292: felix@7292: felix@7292: felix@7292: felix@7292: felix@7292: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT id AS fvmid, aheinecke@6053: description AS fvmd aheinecke@6053: FROM flow_velocity_measurements WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7455: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT id, description, station, datetime, v, w, q aheinecke@6053: FROM flow_velocity_measure_values aheinecke@6053: WHERE measurements_id = ${fvmid} aheinecke@6053: AND station BETWEEN ${fromkm} AND ${tokm} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT id AS width_id aheinecke@6053: FROM morphologic_width aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT min(station) AS from_station, aheinecke@6053: max(station) AS to_station aheinecke@6053: FROM morphologic_width_values aheinecke@6053: WHERE morphologic_width_id = ${width_id} aheinecke@5976: aheinecke@5976: aheinecke@6053: teichmann@5523: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@5405: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT id AS bedh_id, aheinecke@6053: year AS bedh_year, aheinecke@6053: description AS bedh_descr aheinecke@6053: FROM bed_height_single WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7478: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@7236: SELECT sq.description AS description, aheinecke@7236: ti.start_time AS start_time, aheinecke@7236: ti.stop_time AS stop_time, aheinecke@7236: ms.name AS station_name, aheinecke@7236: lower(sqv.parameter) AS parameter, aheinecke@7672: sqv.id AS sqvid, aheinecke@7672: ra.a AS station_km aheinecke@7236: FROM sq_relation sq aheinecke@7236: JOIN time_intervals ti ON ti.id = sq.time_interval_id aheinecke@7236: JOIN rivers r ON r.id = sq.river_id aheinecke@7236: JOIN sq_relation_value sqv ON sqv.sq_relation_id = sq.id aheinecke@7236: JOIN measurement_station ms ON sqv.measurement_station_id = ms.id aheinecke@7672: JOIN ranges ra ON ms.range_id = ra.id aheinecke@7236: WHERE r.id = ${river_id} aheinecke@7672: ORDER BY station_km, start_time, stop_time aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@7672: aheinecke@7672: aheinecke@7672: aheinecke@7672: aheinecke@7672: aheinecke@7672: aheinecke@7672: aheinecke@7672: aheinecke@7672: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@6053: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: aheinecke@6081: aheinecke@6081: aheinecke@6081: felix@6073: felix@6073: felix@6073: felix@6073: felix@6073: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@7276: felix@7276: felix@7276: felix@7276: felix@7276: felix@7276: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT d.id AS dem_id, aheinecke@6053: r.a AS dem_lower, aheinecke@6053: r.b AS dem_upper, aheinecke@6053: d.name AS name, aheinecke@6053: t.start_time AS start_time, aheinecke@6053: t.stop_time AS stop_time, aheinecke@6183: 'Projektion: ' || d.projection || '<BR>' || aheinecke@6183: 'Rasterweite: ' || d.resolution || 'm<BR>' || aheinecke@6183: 'Format: ' || d.format || '<BR>' || aheinecke@6053: 'Zeitraum: ' aheinecke@6053: AS info aheinecke@6053: FROM dem d aheinecke@6053: JOIN ranges r ON d.range_id = r.id aheinecke@6053: LEFT JOIN time_intervals t ON d.time_interval_id = t.id aheinecke@6183: WHERE d.river_id = ${river_id} aheinecke@6183: AND NOT((${tokm} < r.a) or (${fromkm} > r.b)) aheinecke@6183: aheinecke@6183: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@5976: aheinecke@5976: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@5976: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5524: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5524: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: SELECT DISTINCT aheinecke@6054: name AS hws_name, aheinecke@6054: official AS hws_official, aheinecke@6054: kind_id AS hws_kind aheinecke@6054: FROM hws_lines aheinecke@6054: WHERE river_id = ${river_id} aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: SELECT DISTINCT aheinecke@6054: name AS hws_name, aheinecke@6054: official AS hws_official, aheinecke@6054: kind_id AS hws_kind aheinecke@6054: FROM hws_points aheinecke@6054: WHERE river_id = ${river_id} aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6054: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: name aheinecke@6053: FROM hydr_boundaries aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND kind = 2 aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: name aheinecke@6053: FROM hydr_boundaries_poly aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND kind = 2 aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5524: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: name aheinecke@6053: FROM hydr_boundaries aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND kind = 1 aheinecke@6053: aheinecke@6053: What about all other line kinds? aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5524: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: b.sectie AS sectie_id, aheinecke@6053: sk.name AS sectie aheinecke@6053: FROM hydr_boundaries_poly b aheinecke@6053: JOIN sectie_kinds sk ON b.sectie = sk.id aheinecke@6053: WHERE b.river_id = ${river_id} aheinecke@6053: AND b.kind = 1 aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: b.sobek AS sobek_id, aheinecke@6053: sk.name AS sobek aheinecke@6053: FROM hydr_boundaries_poly b aheinecke@6053: JOIN sobek_kinds sk ON b.sobek = sk.id aheinecke@6053: WHERE b.river_id = ${river_id} aheinecke@6053: AND b.kind = 1 aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: b.name AS name aheinecke@6053: FROM hydr_boundaries_poly b aheinecke@6053: WHERE b.river_id = ${river_id} aheinecke@6053: AND b.kind = 1 aheinecke@6053: AND b.sobek IS NULL aheinecke@6053: AND b.sectie is NULL aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT 1 FROM floodmaps WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: teichmann@5523: aheinecke@6053: SELECT DISTINCT 1 FROM floodmaps WHERE river_id = ${river_id} aheinecke@6053: AND (kind = 112 OR kind = 111) teichmann@5523: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT name AS name aheinecke@6053: FROM floodmaps aheinecke@6053: WHERE river_id = ${river_id} AND kind = 111 aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT name AS name aheinecke@6053: FROM floodmaps aheinecke@6053: WHERE river_id = ${river_id} AND kind = 112 aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: teichmann@5523: aheinecke@5760: aheinecke@5760: aheinecke@6053: SELECT DISTINCT 1 from floodmaps where river_id = ${river_id} aheinecke@6053: AND (kind = 122 OR kind = 121) aheinecke@5435: aheinecke@5796: aheinecke@6053: aheinecke@5534: aheinecke@5534: aheinecke@6053: SELECT DISTINCT name AS name aheinecke@6053: FROM floodmaps aheinecke@6053: WHERE river_id = ${river_id} AND kind = 121 aheinecke@5534: aheinecke@5534: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@6053: SELECT DISTINCT aheinecke@6053: name AS name aheinecke@6053: FROM floodmaps aheinecke@6053: WHERE river_id = ${river_id} AND kind = 122 aheinecke@5534: aheinecke@5534: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@5534: aheinecke@5534: aheinecke@6053: aheinecke@5547: aheinecke@5547: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: SELECT DISTINCT aheinecke@6053: source AS source aheinecke@6053: FROM floodmaps aheinecke@6053: WHERE river_id = ${river_id} AND kind = 200 teichmann@5523: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: name AS name aheinecke@6053: FROM floodmaps aheinecke@6053: WHERE river_id = ${river_id} AND kind = 200 AND source = aheinecke@6053: ${source} aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: fp.kind_id AS kind_id, aheinecke@6053: flk.name AS kind_name aheinecke@6053: FROM floodplain fp aheinecke@6053: JOIN floodplain_kinds flk on fp.kind_id = flk.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: teichmann@6098: teichmann@6098: teichmann@6098: teichmann@6098: aheinecke@6124: teichmann@6098: teichmann@6098: teichmann@6098: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@5015: aheinecke@6053: aheinecke@6053: aheinecke@6053: Call from a context where fed_name hws_kind hws_name and river_id is aheinecke@6053: availble aheinecke@6053: rrenkert@5015: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: ingo@2096: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: fs.name AS fed_name, aheinecke@6053: fs.id AS fed_id aheinecke@6053: FROM hws_points hws aheinecke@6053: JOIN fed_states fs ON hws.fed_state_id = fs.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND hws.official=1 aheinecke@6053: aheinecke@6053: teichmann@5523: teichmann@5523: aheinecke@6053: SELECT DISTINCT aheinecke@6053: name AS hws_name, aheinecke@6053: kind_id AS hws_kind aheinecke@6053: FROM hws_points aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND official=1 aheinecke@6053: AND fed_state_id = ${fed_id} ORDER BY name teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT distinct aheinecke@6053: name AS hws_name, aheinecke@6053: kind_id AS hws_kind aheinecke@6053: FROM hws_points aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND official=1 aheinecke@6053: AND fed_state_id IS NULL aheinecke@6053: ORDER BY name aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: fs.name AS fed_name, aheinecke@6053: fs.id AS fed_id aheinecke@6053: FROM hws_points hws aheinecke@6053: JOIN fed_states fs ON hws.fed_state_id = fs.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND hws.official=0 aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: name AS hws_name, aheinecke@6053: kind_id AS hws_kind aheinecke@6053: FROM hws_points aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND official=0 aheinecke@6053: AND fed_state_id = ${fed_id} ORDER BY name aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT distinct aheinecke@6053: name AS hws_name, aheinecke@6053: kind_id AS hws_kind aheinecke@6053: FROM hws_points aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND official=0 aheinecke@6053: AND fed_state_id IS NULL ORDER BY name aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@5523: aheinecke@6053: aheinecke@6053: aheinecke@6053: Call from a context where fed_name hws_kind hws_name and river_id is aheinecke@6053: availble aheinecke@6053: rrenkert@5549: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: rrenkert@5549: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: fs.name AS fed_name, aheinecke@6053: fs.id AS fed_id aheinecke@6053: FROM hws_lines hws aheinecke@6053: JOIN fed_states fs ON hws.fed_state_id = fs.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND hws.official=1 aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: name AS hws_name, aheinecke@6053: kind_id AS hws_kind aheinecke@6053: FROM hws_lines aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND official=1 aheinecke@6053: AND fed_state_id = ${fed_id} ORDER BY name aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT distinct aheinecke@6053: name AS hws_name, aheinecke@6053: kind_id AS hws_kind aheinecke@6053: FROM hws_lines aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND official=1 aheinecke@6053: AND fed_state_id IS NULL aheinecke@6053: ORDER BY name aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: fs.name AS fed_name, aheinecke@6053: fs.id AS fed_id aheinecke@6053: FROM hws_lines hws aheinecke@6053: JOIN fed_states fs ON hws.fed_state_id = fs.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND hws.official=0 aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: name AS hws_name, aheinecke@6053: kind_id AS hws_kind aheinecke@6053: FROM hws_lines aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND official=0 aheinecke@6053: AND fed_state_id = ${fed_id} ORDER BY name aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT distinct aheinecke@6053: name AS hws_name, aheinecke@6053: kind_id AS hws_kind aheinecke@6053: FROM hws_lines aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: AND official=0 aheinecke@6053: AND fed_state_id IS NULL ORDER BY name aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: COALESCE(CAST (year AS VARCHAR(64)), 'Unbekanntes Jahr') AS year aheinecke@6053: FROM flood_marks aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6124: aheinecke@6124: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: ak.name AS kind_name, aheinecke@6053: ax.kind_id AS kind_id, aheinecke@6053: ax.name AS layer_name aheinecke@6053: FROM river_axes ax aheinecke@6053: JOIN axis_kinds ak on ax.kind_id = ak.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@5591: aheinecke@6053: rrenkert@5591: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@5631: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT 1 FROM river_axes_km WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@5631: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT name AS name aheinecke@6053: FROM fixpoints aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: GROUP BY name aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: cs.kind_id AS kind_id, aheinecke@6053: cs.name AS layer_name, aheinecke@6053: ck.name AS kind_name aheinecke@6053: FROM cross_section_tracks cs aheinecke@6053: JOIN cross_section_track_kinds ck ON cs.kind_id = ck.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: teichmann@6098: teichmann@6098: teichmann@6098: teichmann@6098: teichmann@6098: teichmann@6098: teichmann@6098: teichmann@6098: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@5549: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: b.name AS building_name, aheinecke@6053: bk.name AS building_kind, aheinecke@6053: b.kind_id AS building_kind_id aheinecke@6053: FROM buildings b aheinecke@6053: JOIN building_kinds bk ON b.kind_id = bk.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT DISTINCT aheinecke@6053: j.kind_id AS jetty_kind_id, aheinecke@6053: jk.name AS jetty_kind aheinecke@6053: FROM jetties j aheinecke@6053: JOIN jetty_kinds jk ON j.kind_id = jk.id aheinecke@6053: WHERE river_id = ${river_id} aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6054: teichmann@6401: teichmann@6401: teichmann@6401: teichmann@6401: rrenkert@6456: teichmann@6401: teichmann@6401: teichmann@6401: teichmann@6401: teichmann@6401: rrenkert@6456: teichmann@6401: teichmann@6401: teichmann@6401: teichmann@6401: teichmann@6401: aheinecke@6054: aheinecke@6054: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: SELECT w.kind AS kind, aheinecke@6053: w.id AS wst_id, aheinecke@6053: wc.id AS wst_column_id, aheinecke@6053: wc.position AS wst_column_position, aheinecke@6053: wc.description AS info, aheinecke@6053: w.description AS wst_description, aheinecke@6111: COALESCE(wc.name, '') AS wst_column_name, aheinecke@6053: wr.a AS deffrom, aheinecke@6053: wr.b AS defto aheinecke@6053: FROM wst_columns wc aheinecke@6053: JOIN wsts w ON wc.wst_id = w.id aheinecke@6053: JOIN wst_ranges wr ON wc.id = wr.wst_column_id aheinecke@6053: WHERE w.river_id = ${river_id} AND aheinecke@6053: NOT((${tokm} < wr.a) or (${fromkm} > wr.b)) aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6095: felix@6072: aheinecke@6655: Select collections and masterartifacts. aheinecke@6655: XXX: The cast is a quick hack because the ld_* values are aheinecke@6655: now TEXT fields. To properly fix / asses the problems here aheinecke@6655: an SLT evaluation is needed. aheinecke@6655: aheinecke@6053: aheinecke@6053: SELECT c.name AS collection_name, aheinecke@6053: ma.id AS a_id, aheinecke@6053: ma.state AS a_state, aheinecke@6053: ma.gid AS a_gid, aheinecke@6053: ma.creation AS a_creation, aheinecke@6655: CAST(COALESCE(ma.ld_mode, '') AS VARCHAR(255)) AS ld_m, aheinecke@6655: CAST(COALESCE(ma.ld_locations, '') AS VARCHAR(255)) AS ld_l, aheinecke@6655: CAST(COALESCE(ma.ld_from, '') AS VARCHAR(255)) AS ld_f, aheinecke@6655: CAST(COALESCE(ma.ld_to, '') AS VARCHAR(255)) AS ld_t, aheinecke@6095: o.name AS out_name, aheinecke@6111: o.id AS out_id, aheinecke@6111: f.name AS facet_name, aheinecke@6111: f.num AS facet_num, aheinecke@6111: f.description AS facet_description, aheinecke@6111: f.id AS fid aheinecke@6053: FROM users u aheinecke@6053: JOIN collections c ON c.user_id = u.id aheinecke@6053: JOIN master_artifacts_range ma ON ma.collection_id = c.id aheinecke@6095: JOIN outs o ON o.artifact_id = ma.id aheinecke@6111: JOIN facets f ON f.out_id = o.id felix@6070: WHERE u.gid = CAST(${user-id} AS UUID) aheinecke@6053: AND ma.gid <> CAST(${artifact-id} AS uuid) felix@7425: AND f.name NOT LIKE '%empty.facet%' aheinecke@6053: AND EXISTS ( aheinecke@6053: SELECT id aheinecke@6053: FROM artifact_data ad aheinecke@6053: WHERE ad.artifact_id = ma.id aheinecke@6053: AND k = 'river' aheinecke@6053: AND v = ${river}) aheinecke@6053: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6095: aheinecke@7348: aheinecke@7348: Apply KM Filtering but pass aheinecke@7348: sq_ facets with no regard about their location. aheinecke@7348: aheinecke@7348: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6095: aheinecke@6183: aheinecke@6183: aheinecke@6183: aheinecke@6183: aheinecke@6053: ingo@1657: aheinecke@6053: sascha@1046: