teichmann@5523: sascha@1046: aheinecke@6053: rrenkert@5015: tom@8298: 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@8299: Longitudinal sections tom@6638: tom@6638: tom@6638: tom@6638: aheinecke@6053: rrenkert@6456: 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: tom@8431: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@6565: aheinecke@6053: tom@6638: tom@6638: tom@8241: tom@6638: tom@7664: tom@7664: tom@7664: tom@7664: tom@7664: tom@7664: tom@8299: Discharge curves tom@8299: tom@8461: tom@8299: tom@8299: tom@8299: tom@8299: tom@8299: tom@8299: tom@8299: tom@8299: tom@8299: tom@8307: tom@8299: tom@8299: tom@8299: tom@8299: tom@8299: tom@8336: tom@8336: tom@8336: tom@8334: tom@8334: tom@8334: tom@8299: Cross sections tom@8299: tom@8299: tom@8299: tom@8299: tom@8299: tom@8299: Duration curve tom@8299: tom@8299: tom@8299: tom@8299: Reference curve tom@8299: tom@8299: tom@8299: tom@8299: Maps tom@8299: tom@8299: tom@8299: 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: tom@8300: Inline datacage panels tom@8298: rrenkert@7961: rrenkert@7961: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: felix@6075: aheinecke@6053: tom@8300: Longitudinal sections aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@6638: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: rrenkert@6439: 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: tom@8300: Discharge curves tom@8300: tom@8300: tom@8298: tom@8300: tom@8306: aheinecke@6053: tom@8300: tom@8306: aheinecke@6053: tom@8336: tom@8336: tom@8336: aheinecke@6053: felix@7265: aheinecke@6053: tom@8300: tom@8306: felix@6581: tom@8300: Cross sections tom@8300: felix@7572: felix@7572: felix@7572: felix@7675: felix@7572: tom@8300: felix@7572: tom@8300: aheinecke@6081: tom@8300: Duration curve tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: Reference curve tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: Maps tom@8300: tom@8300: tom@8300: tom@8300: tom@8300: 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: tom@8301: Inline datacage panels tom@8298: tom@8298: felix@7435: felix@7435: felix@7435: felix@7435: felix@6581: tom@8298: tom@8377: felix@7435: felix@7435: felix@7435: aheinecke@6095: tom@8301: tom@8301: aheinecke@6095: tom@8301: Longitudinal sections tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: aheinecke@6095: tom@6638: teichmann@7419: 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: tom@8301: Discharge curves tom@8301: tom@8377: tom@8301: tom@8301: tom@8377: tom@8301: tom@8301: tom@8377: felix@7575: felix@7576: tom@8377: felix@7576: tom@8289: tom@8377: aheinecke@7348: tom@8301: Time series tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: Cross sections tom@8301: tom@8301: tom@8301: tom@8301: Duration curve tom@8301: tom@8301: tom@8301: tom@8301: Reference curve tom@8301: tom@8301: tom@8301: tom@8301: Maps tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: tom@8301: 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: 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@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: tom@8377: tom@8377: aheinecke@6053: tom@8377: felix@7418: tom@8377: aheinecke@6111: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: aheinecke@6111: tom@8377: felix@7418: tom@8377: 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: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: 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: tom@8377: tom@8377: tom@8377: aheinecke@6111: aheinecke@6111: felix@7420: aheinecke@6111: aheinecke@6095: aheinecke@6324: aheinecke@6324: tom@8377: aheinecke@6324: aheinecke@6324: tom@8377: 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: tom@8298: 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: andre@8594: 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: aheinecke@7177: tom@8174: aheinecke@6111: aheinecke@6111: aheinecke@6053: felix@7418: felix@7441: aheinecke@6053: aheinecke@6095: aheinecke@6053: aheinecke@6053: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: rrenkert@8004: 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: tom@8289: 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: tom@8307: tom@8307: aheinecke@6053: aheinecke@6053: tom@8334: tom@8334: tom@8334: tom@8334: aheinecke@6053: tom@8334: tom@8334: aheinecke@6053: aheinecke@6053: tom@8461: tom@8461: tom@8461: tom@8461: tom@8461: tom@8461: tom@8461: tom@8461: tom@8461: tom@8461: tom@8461: tom@8487: tom@8461: tom@8461: tom@8461: tom@8487: tom@8461: tom@8461: tom@8389: tom@8487: tom@8389: tom@8434: tom@8434: tom@8434: tom@8434: tom@8434: tom@8434: tom@8434: tom@8389: tom@8487: tom@8389: tom@8389: tom@8389: tom@8487: tom@8389: tom@8389: tom@8434: tom@8434: tom@8461: tom@8434: tom@8434: tom@8389: tom@8389: tom@8487: tom@8389: tom@8389: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8487: tom@8389: tom@8389: SELECT g.name AS gauge_name, tom@8389: dt.id AS dt_id, tom@8389: t.start_time AS start_time, tom@8389: t.stop_time AS stop_time, tom@8389: dt.bfg_id AS bfg_id, tom@8389: dt.kind AS kind tom@8389: FROM gauges g tom@8389: JOIN discharge_tables dt ON g.id = dt.gauge_id tom@8389: LEFT JOIN time_intervals t ON dt.time_interval_id = t.id tom@8389: WHERE g.river_id = ${river_id} tom@8487: AND g.station BETWEEN ${fromkm} AND ${tokm} tom@8389: ORDER BY start_time tom@8389: tom@8389: tom@8389: tom@8487: tom@8487: tom@8487: SELECT g.name AS gauge_name, tom@8487: dt.id AS dt_id, tom@8487: t.start_time AS start_time, tom@8487: t.stop_time AS stop_time, tom@8487: dt.bfg_id AS bfg_id, tom@8487: dt.kind AS kind tom@8487: FROM gauges g tom@8487: JOIN discharge_tables dt ON g.id = dt.gauge_id tom@8487: LEFT JOIN time_intervals t ON dt.time_interval_id = t.id tom@8487: WHERE g.river_id = ${river_id} tom@8487: AND g.official_number = ${refgauge} tom@8487: ORDER BY start_time tom@8487: tom@8487: tom@8487: tom@8487: 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: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: 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: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@8307: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: felix@7621: tom@8307: tom@8307: tom@8307: tom@8307: aheinecke@6053: aheinecke@6053: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6081: aheinecke@6084: aheinecke@6053: tom@8307: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: aheinecke@6053: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: aheinecke@6053: tom@8307: tom@8307: tom@8307: aheinecke@6053: tom@8307: aheinecke@6053: tom@8307: aheinecke@6053: tom@8307: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8307: tom@8306: felix@7265: tom@8306: tom@8306: tom@8306: tom@8306: felix@7265: felix@7265: tom@8306: tom@8307: felix@7621: tom@8307: tom@8307: tom@8306: tom@8306: tom@8307: tom@8306: felix@7265: felix@7265: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: tom@8377: 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: andre@8096: 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 rrenkert@8004: teichmann@7419: felix@7443: teichmann@7419: teichmann@7419: felix@7333: felix@7333: tom@8307: tom@8307: 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@8120: 'Tiefe: ' || d.lower || ' - ' || d.upper tom@7905: || ' cm <BR>' || tom@8119: 'Zeitraum: ' AS info, tom@8119: t.start_time AS syear, tom@8119: t.stop_time AS eyear 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: d.lower AS depth_lower, felix@7451: d.upper AS depth_upper, tom@8141: min(sdv.year) AS year, tom@8141: sd.description || '<BR>Jahr: ' || min(sdv.year) AS info 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: tom@8307: tom@8120: tom@8120: andre@8096: andre@8096: tom@8120: tom@8120: felix@7279: felix@7279: felix@7278: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: felix@7278: tom@8079: tom@8120: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8297: tom@8120: tom@8120: andre@8096: andre@8096: tom@8079: tom@8079: tom@8120: tom@8416: tom@8120: tom@8079: tom@8120: tom@8079: tom@8120: tom@8120: tom@8079: tom@8079: tom@8120: tom@8416: tom@8120: tom@8079: tom@8120: tom@8079: tom@8120: tom@8120: tom@8079: andre@8096: felix@7190: felix@7190: tom@8416: tom@8416: tom@8416: SELECT DISTINCT tom@8416: sl.id AS slid, tom@8416: slk.kind AS kind, tom@8416: ti.start_time AS startyear, tom@8416: ti.stop_time AS endyear, tom@8416: sq.start_time AS sqstart, tom@8416: sq.stop_time AS sqstop, tom@8416: sq.id AS sqid, tom@8416: gf.name AS fraction, tom@8416: sl.description || '<BR>' || tom@8416: 'Fraktion: ' || gf.lower || ' bis ' || gf.upper || tom@8416: ' mm<BR>Einheit: t/a' AS info tom@8416: FROM sediment_load sl tom@8416: JOIN sediment_load_kinds slk ON slk.id = sl.kind tom@8416: JOIN sediment_load_values slv tom@8416: ON sl.id = slv.sediment_load_id tom@8416: JOIN measurement_station ms tom@8416: ON ms.id = slv.measurement_station_id tom@8416: JOIN ranges ra ON ms.range_id = ra.id tom@8416: JOIN rivers r ON ra.river_id = r.id tom@8416: JOIN time_intervals ti ON sl.time_interval_id = ti.id tom@8416: LEFT JOIN time_intervals sq ON sl.sq_time_interval_id = sq.id tom@8416: JOIN grain_fraction gf ON gf.id = sl.grain_fraction_id tom@8416: WHERE r.id = ${river_id} tom@8416: AND CASE WHEN r.km_up = 1 AND ra.b IS NOT NULL tom@8416: THEN ra.b ELSE ra.a END BETWEEN ${fromkm} AND ${tokm} tom@8416: ORDER BY sqstart DESC, sqstop DESC, tom@8416: fraction, startyear DESC, endyear DESC tom@8416: tom@8416: tom@8416: tom@8416: tom@8416: tom@8416: SELECT DISTINCT tom@8416: sl.id AS slid, tom@8416: slk.kind AS kind, tom@8416: ti.start_time AS startyear, tom@8416: ti.stop_time AS endyear, tom@8416: sq.start_time AS sqstart, tom@8416: sq.stop_time AS sqstop, tom@8416: sq.id AS sqid, tom@8416: gf.name AS fraction, tom@8416: sl.description || '<BR>' || tom@8416: 'Fraktion: ' || gf.lower || ' bis ' || gf.upper || tom@8416: ' mm<BR>Einheit: ' || u.name AS info tom@8416: FROM sediment_load_ls sl tom@8416: JOIN sediment_load_kinds slk ON slk.id = sl.kind tom@8416: JOIN rivers r ON sl.river_id = r.id tom@8416: JOIN sediment_load_ls_values slv tom@8416: ON sl.id = slv.sediment_load_ls_id tom@8416: JOIN time_intervals ti ON sl.time_interval_id = ti.id tom@8416: LEFT JOIN time_intervals sq ON sl.sq_time_interval_id = sq.id tom@8416: JOIN grain_fraction gf ON gf.id = sl.grain_fraction_id tom@8416: JOIN units u ON sl.unit_id = u.id tom@8416: WHERE r.id = ${river_id} tom@8416: AND slv.station BETWEEN ${fromkm} AND ${tokm} tom@8416: ORDER BY sqstart DESC, sqstop DESC, tom@8416: fraction, startyear DESC, endyear DESC tom@8416: tom@8416: tom@8416: tom@8307: tom@8389: tom@8389: tom@8389: tom@8389: 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@8072: 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@7978: 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@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6124: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@8419: rrenkert@7961: tom@8431: tom@8431: rrenkert@7961: WITH sta rrenkert@7961: AS (SELECT bhs.id, rrenkert@7961: bhs.description, rrenkert@7961: bhsv.station, rrenkert@7961: bhs.year tom@8582: FROM bed_height bhs tom@8582: JOIN bed_height_values bhsv tom@8582: ON bhsv.bed_height_id = bhs.id andre@8544: WHERE bhs.river_id = ${river_id} andre@8544: AND bhsv.station BETWEEN ${fromkm} AND ${tokm}), rrenkert@7961: csta rrenkert@7970: AS (SELECT b1.id AS b1id, rrenkert@7961: b1.description AS b1desc, rrenkert@7961: b1.year AS b1year, rrenkert@7970: b2.id AS b2id, rrenkert@7970: b2.description AS b2desc, rrenkert@7961: b2.year AS b2year rrenkert@7961: FROM sta b1 rrenkert@7961: JOIN sta b2 rrenkert@7961: ON b1.station = b2.station tom@8553: AND b1.id <> b2.id tom@8553: AND (b1.year > b2.year OR b1.year IS NULL)) rrenkert@7970: SELECT DISTINCT b1id, b1desc, b1year, rrenkert@7970: b2id, b2desc, b2year rrenkert@7961: FROM csta rrenkert@7970: ORDER BY b1desc, b2desc tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: rrenkert@7961: rrenkert@7961: rrenkert@7961: tom@8009: rrenkert@7961: rrenkert@7970: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: tom@8009: rrenkert@7961: rrenkert@7970: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7961: rrenkert@7975: rrenkert@7970: rrenkert@7961: rrenkert@7970: rrenkert@7970: rrenkert@7970: rrenkert@7970: rrenkert@7970: rrenkert@7970: rrenkert@7970: rrenkert@7970: rrenkert@7970: rrenkert@7961: rrenkert@7970: rrenkert@7961: rrenkert@7961: rrenkert@7961: tom@8419: tom@8419: tom@8419: tom@8419: tom@8419: tom@8141: tom@8141: tom@8141: tom@8141: tom@8141: tom@8141: tom@8141: tom@8141: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@8141: tom@8141: tom@8141: tom@8419: tom@8419: tom@8141: tom@8419: tom@8141: tom@8141: tom@8141: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@8141: tom@8141: tom@8141: tom@8141: aheinecke@6053: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8431: tom@8419: tom@8419: tom@8419: SELECT bhs.id AS bedh_id, tom@8419: bhs.year AS bedh_year, tom@8419: bhs.description AS bedh_descr, tom@8419: bhs.description || '<BR>Jahr: ' || bhs.year || tom@8419: '<BR>Aufnahmeart: ' || bht.name || tom@8419: '<BR>Lagesystem: ' || ls.name || tom@8419: '<BR>Höhensystem: ' || cur_em.name || tom@8419: '<BR>ursprüngliches Höhensystem: ' || old_em.name || tom@8419: '<BR>Strecke: ' || round(r.a, 1) || '-' || round(r.b, 1) || tom@8419: '<BR>Auswerter: ' || bhs.evaluation_by AS info tom@8582: FROM bed_height bhs tom@8431: JOIN bed_height_type bht ON bht.id = bhs.type_id tom@8431: JOIN location_system ls ON ls.id = location_system_id tom@8431: JOIN elevation_model cur_em ON cur_em.id = cur_elevation_model_id tom@8431: LEFT JOIN elevation_model old_em tom@8431: ON old_em.id = old_elevation_model_id tom@8431: LEFT JOIN ranges r ON r.id = range_id tom@8419: WHERE bhs.river_id = ${river_id} tom@8419: tom@8419: tom@8419: tom@8419: felix@7292: felix@7292: felix@7292: felix@7421: SELECT fvm.id AS fvmid, felix@7421: fvm.description AS fvmd, tom@8141: dz.gauge_name AS gauge, tom@8141: dz.value AS q, felix@7402: dz.upper_discharge AS upperQ, felix@7402: dz.lower_discharge AS lowerQ felix@7292: FROM flow_velocity_model fvm tom@8502: 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@7236: aheinecke@7236: aheinecke@7236: tom@8308: SELECT 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 tom@8308: JOIN time_intervals ti ON ti.id = sq.time_interval_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 tom@8308: JOIN rivers r ON r.id = ra.river_id aheinecke@7236: WHERE r.id = ${river_id} tom@8308: ORDER BY start_time, stop_time aheinecke@7236: aheinecke@7236: aheinecke@7236: tom@8308: tom@8308: tom@8308: tom@8308: tom@8308: tom@8308: tom@8308: rrenkert@8327: tom@8308: tom@8308: tom@8308: tom@8308: tom@8308: tom@8308: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@7236: aheinecke@6053: aheinecke@6053: aheinecke@6053: tom@8269: 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: tom@8416: tom@8241: tom@8416: tom@8416: tom@8416: tom@8416: tom@8416: tom@8241: andre@8598: andre@8598: andre@8598: andre@8598: tom@8416: tom@8416: tom@8416: tom@8416: tom@8241: tom@8241: tom@8241: tom@8241: tom@8416: tom@8241: tom@8241: tom@8241: tom@8241: tom@8241: tom@8241: tom@8241: tom@8416: tom@8241: tom@8241: tom@8241: tom@8241: tom@8241: tom@8241: tom@8241: tom@8241: tom@8416: 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)) tom@8473: ORDER BY wst_column_position 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: andre@8508: andre@8508: Inverting KM filter. andre@8508: andre@8508: andre@8508: aheinecke@6183: aheinecke@6053: ingo@1657: aheinecke@6053: sascha@1046: