teichmann@5523: sascha@1046: sascha@1046: rrenkert@5015: rrenkert@5015: Statement to load data from wsts. rrenkert@5015: rrenkert@5015: felix@4894: felix@4894: SELECT wst_columns.id AS prot_column_id, felix@4894: wst_columns.name AS prot_column_name, felix@4894: wst_columns.position AS prot_rel_pos, felix@4895: wst_columns.description AS info, felix@4895: wst_ranges.a AS deffrom, felix@4895: wst_ranges.b AS defto felix@4895: FROM wst_columns, wst_ranges rrenkert@5015: WHERE wst_columns.wst_id = ${prot_id} rrenkert@5015: AND wst_ranges.wst_column_id = wst_columns.id rrenkert@5015: AND (${fromkm} BETWEEN wst_ranges.a AND wst_ranges.b rrenkert@5015: OR ${tokm} BETWEEN wst_ranges.a AND wst_ranges.b rrenkert@5015: OR wst_ranges.a BETWEEN ${fromkm} AND ${tokm} rrenkert@5015: OR wst_ranges.b BETWEEN ${fromkm} AND ${tokm}) felix@4894: ORDER by wst_columns.position felix@4894: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: Load user specific distance information from artifact. rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT COALESCE(ld_mode, '') AS ldm, rrenkert@5015: COALESCE(ld_locations, '') AS ldl, rrenkert@5015: COALESCE(ld_from, '') AS ldf, rrenkert@5015: COALESCE(ld_to, '') AS ldt rrenkert@5015: FROM master_artifacts_range teichmann@5523: WHERE gid = CAST(${artifact-id} AS uuid) rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: System part. Load data for the given river. rrenkert@5015: ingo@1181: ingo@1181: ingo@1181: teichmann@5523: SELECT id AS river_id, name AS river_name FROM rivers ingo@1181: WHERE lower(name) LIKE lower(${river}) ingo@1181: teichmann@5522: rrenkert@5015: felix@1790: rrenkert@5015: Base-data macros (mostly data imported from wst-files). felix@1790: felix@1790: rrenkert@5015: felix@1790: felix@1790: rrenkert@5015: felix@1790: felix@1790: SELECT id AS prot_id, felix@1790: description AS prot_description felix@1790: FROM wsts WHERE kind = 0 AND river_id = ${river_id} felix@1790: teichmann@5522: teichmann@5523: felix@1790: felix@4894: teichmann@5522: teichmann@5523: teichmann@5522: felix@1790: felix@1790: teichmann@5522: felix@1790: felix@1790: rrenkert@5015: felix@1790: rrenkert@5015: felix@1916: rrenkert@5015: felix@1916: felix@1916: rrenkert@5015: felix@1916: felix@1916: SELECT id AS prot_id, felix@1916: description AS prot_description felix@1916: FROM wsts WHERE kind = 0 AND river_id = ${river_id} felix@1916: teichmann@5522: teichmann@5523: felix@1916: felix@4894: teichmann@5522: teichmann@5523: teichmann@5522: felix@1916: felix@1916: teichmann@5522: felix@1916: felix@1916: rrenkert@5015: felix@1916: felix@1916: felix@4143: rrenkert@5015: felix@4143: felix@4143: rrenkert@5015: felix@4143: felix@4143: SELECT id AS prot_id, felix@4143: description AS prot_description felix@4143: FROM wsts WHERE kind = 1 AND river_id = ${river_id} felix@4143: teichmann@5522: teichmann@5523: felix@4143: felix@4894: teichmann@5522: teichmann@5523: teichmann@5522: teichmann@5523: teichmann@5522: felix@4143: felix@4143: rrenkert@5015: felix@4143: felix@4143: felix@1790: rrenkert@5015: felix@1790: felix@2085: rrenkert@5015: felix@1790: felix@1790: SELECT id AS prot_id, felix@1790: description AS prot_description felix@1790: FROM wsts WHERE kind = 1 AND river_id = ${river_id} felix@1790: teichmann@5522: tom@5746: felix@1790: felix@4894: teichmann@5522: teichmann@5523: teichmann@5522: felix@1790: felix@1790: teichmann@5522: felix@1790: felix@2085: rrenkert@5015: felix@1790: felix@1764: felix@2761: rrenkert@5015: felix@2761: felix@2761: rrenkert@5015: felix@1728: felix@1728: SELECT id AS prot_id, felix@1728: description AS prot_description felix@1731: FROM wsts WHERE kind = 1 AND river_id = ${river_id} felix@1731: teichmann@5522: teichmann@5523: felix@2761: felix@4894: teichmann@5522: teichmann@5523: teichmann@5522: felix@2761: felix@2761: teichmann@5522: felix@1731: felix@2761: rrenkert@5015: felix@2761: felix@2761: felix@1905: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 2 AND river_id = ${river_id} aheinecke@5560: ORDER BY prot_description rrenkert@5015: teichmann@5522: aheinecke@5562: teichmann@5523: rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@1905: felix@1905: felix@1905: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 2 AND river_id = ${river_id} aheinecke@5560: ORDER BY prot_description rrenkert@5015: teichmann@5522: aheinecke@5562: rrenkert@5015: rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@1905: felix@1905: felix@1872: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 2 AND river_id = ${river_id} aheinecke@5560: ORDER BY prot_description rrenkert@5015: teichmann@5522: aheinecke@5562: rrenkert@5015: rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@1872: felix@1872: felix@2749: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 2 AND river_id = ${river_id} aheinecke@5560: ORDER BY prot_description rrenkert@5015: teichmann@5522: aheinecke@5562: rrenkert@5015: rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@2749: felix@2751: felix@3283: rrenkert@5015: felix@3283: felix@3283: rrenkert@5015: felix@3283: felix@3283: SELECT id AS prot_id, felix@3283: description AS prot_description felix@3283: FROM wsts WHERE kind = 3 AND river_id = ${river_id} felix@3283: teichmann@5522: teichmann@5523: felix@3283: felix@4894: teichmann@5522: teichmann@5523: teichmann@5522: felix@3283: felix@3283: teichmann@5522: felix@3283: felix@3283: rrenkert@5015: felix@3283: felix@3283: felix@2751: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 4 AND river_id = ${river_id} rrenkert@5015: teichmann@5522: teichmann@5523: rrenkert@5015: rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@2751: felix@2751: felix@1869: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 4 AND river_id = ${river_id} rrenkert@5015: teichmann@5522: tom@5746: rrenkert@5015: rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@1869: felix@1978: felix@1916: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 4 AND river_id = ${river_id} rrenkert@5015: teichmann@5522: tom@5746: tom@5746: rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@1916: felix@1869: felix@2751: rrenkert@5015: teichmann@5523: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 5 AND river_id = ${river_id} rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5523: rrenkert@5015: rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: teichmann@5522: teichmann@5523: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: teichmann@5523: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS prot_id, rrenkert@5015: description AS prot_description rrenkert@5015: FROM wsts WHERE kind = 5 AND river_id = ${river_id} rrenkert@5015: teichmann@5522: tom@5746: felix@2751: felix@4894: teichmann@5522: teichmann@5523: teichmann@5522: felix@2751: rrenkert@5015: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@1905: felix@1905: felix@1851: teichmann@5523: teichmann@5523: teichmann@5523: felix@1851: felix@1865: felix@3574: teichmann@5523: felix@3574: felix@3574: felix@1865: teichmann@5523: felix@1865: felix@1865: felix@4014: felix@4014: felix@4014: teichmann@5523: felix@4014: felix@4014: SELECT id AS anno_id, felix@4014: name AS anno_description felix@4014: FROM annotation_types felix@4014: teichmann@5522: teichmann@5523: teichmann@5522: felix@4014: felix@4014: felix@4014: felix@4014: felix@1978: rrenkert@5015: teichmann@5523: rrenkert@5015: rrenkert@5015: rrenkert@5164: SELECT DISTINCT rrenkert@5015: cs.id AS prot_id, rrenkert@5015: cs.description AS prot_description rrenkert@5015: FROM cross_sections cs rrenkert@5015: JOIN cross_section_lines csl ON csl.cross_section_id = cs.id rrenkert@5015: WHERE cs.river_id = ${river_id} rrenkert@5015: AND csl.km BETWEEN ${fromkm} AND ${tokm} rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@1978: felix@1978: felix@2140: rrenkert@5015: teichmann@5523: rrenkert@5015: rrenkert@5015: rrenkert@5164: SELECT DISTINCT rrenkert@5015: h.id AS hyk_id, rrenkert@5015: h.description AS hyk_description rrenkert@5015: FROM hyks h rrenkert@5015: JOIN hyk_entries he ON he.hyk_id = h.id rrenkert@5015: WHERE river_id = ${river_id} rrenkert@5015: AND he.km BETWEEN ${fromkm} AND ${tokm} rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: teichmann@5523: rrenkert@5015: felix@2140: felix@1869: felix@4455: rrenkert@5015: rrenkert@5015: teichmann@5523: rrenkert@5015: rrenkert@5015: SELECT id AS fvmid, rrenkert@5015: description AS fvmd rrenkert@5015: FROM flow_velocity_measurements WHERE river_id = ${river_id} rrenkert@5015: teichmann@5522: teichmann@5523: rrenkert@5015: teichmann@5523: teichmann@5523: SELECT id, description, station, datetime, v, w, q teichmann@5523: FROM flow_velocity_measure_values teichmann@5523: WHERE measurements_id = ${fvmid} teichmann@5523: AND station BETWEEN ${fromkm} AND ${tokm} teichmann@5523: teichmann@5523: rrenkert@5575: teichmann@5523: rrenkert@5015: rrenkert@5015: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: SELECT id AS bedh_id, rrenkert@5015: year AS bedh_year, rrenkert@5015: description AS bedh_descr rrenkert@5015: FROM bed_height_single WHERE river_id = ${river_id} rrenkert@5015: teichmann@5522: teichmann@5523: teichmann@5522: rrenkert@5015: rrenkert@5015: felix@4455: felix@4455: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT id AS width_id rrenkert@5631: FROM morphologic_width rrenkert@5631: WHERE river_id = ${river_id} rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT min(station) AS from, rrenkert@5631: max(station) AS to rrenkert@5631: FROM morphologic_width_values rrenkert@5631: WHERE morphologic_width_id = ${width_id} rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: felix@4595: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: rrenkert@5015: felix@4595: felix@4595: felix@1869: felix@1869: + River-Node felix@1869: aheinecke@5405: felix@1865: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: Recommendations (client shall load immediately). aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: Non - Recommendations. aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: felix@4123: felix@4123: felix@4123: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: rrenkert@5575: aheinecke@5405: aheinecke@5405: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: aheinecke@5405: aheinecke@5405: MINFO bedheight middle aheinecke@5405: aheinecke@5405: aheinecke@5405: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: aheinecke@5405: rrenkert@5682: rrenkert@5682: rrenkert@5682: rrenkert@5682: rrenkert@5682: rrenkert@5682: rrenkert@5682: aheinecke@5405: aheinecke@5405: aheinecke@5405: felix@1872: aheinecke@5405: felix@1905: aheinecke@5405: aheinecke@5405: felix@3585: aheinecke@5405: aheinecke@5405: teichmann@5328: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5405: aheinecke@5405: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT id AS gauge_id, teichmann@5523: name AS gauge_name teichmann@5523: FROM gauges WHERE river_id = ${river_id} teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5405: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT id AS gauge_id, teichmann@5523: name AS gauge_name teichmann@5523: FROM gauges WHERE river_id = ${river_id} teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5579: aheinecke@5579: aheinecke@5579: aheinecke@5579: aheinecke@5579: aheinecke@5579: aheinecke@5579: aheinecke@5597: aheinecke@5597: aheinecke@5597: aheinecke@5597: aheinecke@5597: aheinecke@5597: aheinecke@5579: aheinecke@5579: aheinecke@5579: aheinecke@5579: aheinecke@5405: teichmann@5523: teichmann@5523: teichmann@5523: FIXME: Following two macros look identical to me. teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5477: aheinecke@5477: teichmann@5523: SELECT d.id AS dem_id, teichmann@5523: r.a AS dem_lower, teichmann@5523: r.b AS dem_upper, teichmann@5523: d.name AS name, aheinecke@5625: t.start_time AS start_time, aheinecke@5625: t.stop_time AS stop_time, aheinecke@5627: 'Projektion: ' || d.projection || '$' || aheinecke@5627: 'Rasterweite: ' || d.resolution || 'm$' || aheinecke@5627: 'Format: ' || d.format || '$' || aheinecke@5627: 'Zeitraum: ' aheinecke@5625: AS info teichmann@5523: FROM dem d teichmann@5523: JOIN ranges r ON d.range_id = r.id tom@5529: LEFT JOIN time_intervals t ON d.time_interval_id = t.id teichmann@5523: WHERE d.river_id = ${river_id} aheinecke@5515: teichmann@5522: aheinecke@5625: teichmann@5522: aheinecke@5515: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: aheinecke@5605: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: aheinecke@5605: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: aheinecke@5605: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5524: name AS hws_name, teichmann@5523: official AS hws_official, teichmann@5524: kind_id AS hws_kind teichmann@5523: FROM hws_lines teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5524: name AS hws_name, teichmann@5524: official AS hws_official, teichmann@5524: kind_id AS hws_kind teichmann@5523: FROM hws_points teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5548: SELECT DISTINCT 1 FROM river_axes_km WHERE river_id = ${river_id} teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: Grab only the actual first teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: cs.kind_id AS kind_id, teichmann@5523: ck.name AS kind_name teichmann@5523: FROM cross_section_tracks cs teichmann@5523: JOIN cross_section_track_kinds ck on cs.kind_id = ck.id teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND kind_id=1 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: Now the other tracks teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: cs.kind_id AS kind_id, teichmann@5523: ck.name AS kind_name, teichmann@5523: cs.name AS layer_name teichmann@5523: FROM cross_section_tracks cs teichmann@5523: JOIN cross_section_track_kinds ck on cs.kind_id = ck.id teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND kind_id=0 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: ax.kind_id AS kind_id, teichmann@5523: ak.name AS kind_name teichmann@5523: FROM river_axes ax teichmann@5523: JOIN axis_kinds ak on ax.kind_id = ak.id teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND kind_id=1 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: ak.name AS kind_name, teichmann@5523: ax.kind_id AS kind_id, teichmann@5523: ax.name AS layer_name teichmann@5523: FROM river_axes ax teichmann@5523: JOIN axis_kinds ak on ax.kind_id = ak.id teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND kind_id <> 1 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: name teichmann@5523: FROM hydr_boundaries teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND kind = 2 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: name teichmann@5523: FROM hydr_boundaries_poly teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND kind = 2 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: name teichmann@5523: FROM hydr_boundaries teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND kind = 1 teichmann@5523: teichmann@5523: What about all other line kinds? teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: b.sectie AS sectie_id, teichmann@5523: sk.name AS sectie teichmann@5523: FROM hydr_boundaries_poly b teichmann@5523: JOIN sectie_kinds sk ON b.sectie = sk.id teichmann@5523: WHERE b.river_id = ${river_id} teichmann@5523: AND b.kind = 1 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: b.sobek AS sobek_id, teichmann@5523: sk.name AS sobek teichmann@5523: FROM hydr_boundaries_poly b teichmann@5523: JOIN sobek_kinds sk ON b.sobek = sk.id teichmann@5523: WHERE b.river_id = ${river_id} teichmann@5523: AND b.kind = 1 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: SELECT DISTINCT aheinecke@5619: fp.kind_id AS kind_id, aheinecke@5619: flk.name AS kind_name aheinecke@5619: FROM floodplain fp aheinecke@5619: JOIN floodplain_kinds flk on fp.kind_id = flk.id aheinecke@5619: WHERE river_id = ${river_id} aheinecke@5619: AND kind_id=1 aheinecke@5619: aheinecke@5619: teichmann@5522: aheinecke@5496: teichmann@5522: aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: SELECT DISTINCT aheinecke@5619: flk.name AS kind_name, aheinecke@5619: fp.kind_id AS kind_id, aheinecke@5619: fp.name AS layer_name aheinecke@5619: FROM floodplain fp aheinecke@5619: JOIN floodplain_kinds flk on fp.kind_id = flk.id aheinecke@5619: WHERE river_id = ${river_id} aheinecke@5619: AND kind_id <> 1 aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: aheinecke@5619: teichmann@5523: aheinecke@5405: teichmann@5523: teichmann@5523: teichmann@5523: Call from a context where fed_name hws_kind hws_name and river_id is teichmann@5523: availble teichmann@5523: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5523: teichmann@5523: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: fs.name AS fed_name, teichmann@5523: fs.id AS fed_id teichmann@5523: FROM hws_lines hws teichmann@5523: JOIN fed_states fs ON hws.fed_state_id = fs.id teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND hws.official=1 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: name AS hws_name, teichmann@5523: kind_id AS hws_kind teichmann@5523: FROM hws_lines teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND official=1 teichmann@5523: AND fed_state_id = ${fed_id} ORDER BY name teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT distinct teichmann@5523: name AS hws_name, teichmann@5523: kind_id AS hws_kind teichmann@5523: FROM hws_lines teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND official=1 teichmann@5523: AND fed_state_id IS NULL teichmann@5523: ORDER BY name teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: fs.name AS fed_name, teichmann@5523: fs.id AS fed_id teichmann@5523: FROM hws_lines hws teichmann@5523: JOIN fed_states fs ON hws.fed_state_id = fs.id teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND hws.official=0 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: name AS hws_name, teichmann@5523: kind_id AS hws_kind teichmann@5523: FROM hws_lines teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND official=0 teichmann@5523: AND fed_state_id = ${fed_id} ORDER BY name teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT distinct teichmann@5523: name AS hws_name, teichmann@5523: kind_id AS hws_kind teichmann@5523: FROM hws_lines teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND official=0 teichmann@5523: AND fed_state_id IS NULL ORDER BY name teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5405: aheinecke@5405: aheinecke@5405: teichmann@5523: teichmann@5523: teichmann@5523: Call from a context where fed_name hws_kind hws_name and river_id is teichmann@5523: availble teichmann@5523: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5523: teichmann@5523: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5524: teichmann@5523: aheinecke@5405: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: fs.name AS fed_name, teichmann@5523: fs.id AS fed_id teichmann@5523: FROM hws_points hws teichmann@5523: JOIN fed_states fs ON hws.fed_state_id = fs.id teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND hws.official=1 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: name AS hws_name, teichmann@5523: kind_id AS hws_kind teichmann@5523: FROM hws_points teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND official=1 teichmann@5523: AND fed_state_id = ${fed_id} ORDER BY name teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT distinct teichmann@5523: name AS hws_name, teichmann@5523: kind_id AS hws_kind teichmann@5523: FROM hws_points teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND official=1 teichmann@5523: AND fed_state_id IS NULL teichmann@5523: ORDER BY name teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: fs.name AS fed_name, teichmann@5523: fs.id AS fed_id teichmann@5523: FROM hws_points hws teichmann@5523: JOIN fed_states fs ON hws.fed_state_id = fs.id teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND hws.official=0 teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT DISTINCT teichmann@5523: name AS hws_name, teichmann@5523: kind_id AS hws_kind teichmann@5523: FROM hws_points teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND official=0 teichmann@5523: AND fed_state_id = ${fed_id} ORDER BY name teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT distinct teichmann@5523: name AS hws_name, teichmann@5523: kind_id AS hws_kind teichmann@5523: FROM hws_points teichmann@5523: WHERE river_id = ${river_id} teichmann@5523: AND official=0 teichmann@5523: AND fed_state_id IS NULL ORDER BY name teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: SELECT DISTINCT aheinecke@5405: b.kind_id AS building_kind_id, aheinecke@5405: bk.name AS building_kind aheinecke@5405: FROM buildings b aheinecke@5405: JOIN building_kinds bk ON b.kind_id = bk.id aheinecke@5435: WHERE b.river_id = ${river_id} aheinecke@5467: AND b.kind_id <> 0 aheinecke@5405: teichmann@5522: teichmann@5523: teichmann@5522: aheinecke@5405: aheinecke@5435: aheinecke@5435: aheinecke@5435: SELECT DISTINCT aheinecke@5435: b.kind_id AS building_kind_id, aheinecke@5435: b.name AS building_name, aheinecke@5435: bk.name AS building_kind aheinecke@5435: FROM buildings b aheinecke@5435: JOIN building_kinds bk ON b.kind_id = bk.id aheinecke@5435: WHERE river_id = ${river_id} aheinecke@5435: AND kind_id = 0 OR aheinecke@5435: kind_id IS NULL aheinecke@5435: teichmann@5522: aheinecke@5435: teichmann@5522: teichmann@5523: teichmann@5522: aheinecke@5435: teichmann@5522: aheinecke@5435: aheinecke@5437: aheinecke@5437: aheinecke@5437: SELECT DISTINCT aheinecke@5437: j.kind_id AS jetty_kind_id, aheinecke@5437: jk.name AS jetty_kind aheinecke@5437: FROM jetties j aheinecke@5437: JOIN jetty_kinds jk ON j.kind_id = jk.id aheinecke@5437: WHERE river_id = ${river_id} aheinecke@5437: aheinecke@5437: aheinecke@5437: teichmann@5522: teichmann@5523: teichmann@5522: aheinecke@5437: aheinecke@5437: aheinecke@5437: aheinecke@5405: aheinecke@5464: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5533: SELECT name AS name teichmann@5523: FROM fixpoints WHERE river_id = ${river_id} GROUP BY name teichmann@5523: aheinecke@5533: aheinecke@5614: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5466: teichmann@5523: aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5534: aheinecke@5534: aheinecke@5534: SELECT DISTINCT 1 from floodmaps where river_id = ${river_id} aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: SELECT DISTINCT 1 from floodmaps where river_id = ${river_id} aheinecke@5534: AND (kind = 112 OR kind = 111) aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: SELECT DISTINCT name AS name aheinecke@5534: FROM floodmaps aheinecke@5534: WHERE river_id = ${river_id} AND kind = 111 aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: SELECT DISTINCT name AS name aheinecke@5534: FROM floodmaps aheinecke@5534: WHERE river_id = ${river_id} AND kind = 112 aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: SELECT DISTINCT 1 from floodmaps where river_id = ${river_id} aheinecke@5534: AND (kind = 122 OR kind = 121) aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: SELECT DISTINCT name AS name aheinecke@5534: FROM floodmaps aheinecke@5534: WHERE river_id = ${river_id} AND kind = 121 aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: SELECT DISTINCT aheinecke@5534: name AS name aheinecke@5534: FROM floodmaps aheinecke@5534: WHERE river_id = ${river_id} AND kind = 122 aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: SELECT DISTINCT aheinecke@5534: source AS source aheinecke@5534: FROM floodmaps aheinecke@5534: WHERE river_id = ${river_id} AND kind = 200 aheinecke@5534: aheinecke@5534: aheinecke@5534: teichmann@5523: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: SELECT DISTINCT aheinecke@5534: name AS name aheinecke@5534: FROM floodmaps aheinecke@5534: WHERE river_id = ${river_id} AND kind = 200 AND source = aheinecke@5534: ${source} aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: teichmann@5523: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: aheinecke@5534: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: SELECT DISTINCT aheinecke@5547: coalesce(CAST (year AS VARCHAR(64)), 'Unbekanntes Jahr') as year aheinecke@5547: FROM flood_marks aheinecke@5547: WHERE river_id = ${river_id} aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: aheinecke@5547: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5547: aheinecke@5547: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: aheinecke@5547: teichmann@5523: teichmann@5523: aheinecke@5405: teichmann@5523: aheinecke@5405: aheinecke@5405: aheinecke@5405: raimund@3614: aheinecke@5405: raimund@3614: raimund@3614: raimund@3614: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: teichmann@5523: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: teichmann@5523: SELECT id AS bedh_id, teichmann@5523: year AS bedh_year, teichmann@5523: description AS bedh_descr teichmann@5523: FROM bed_height_single WHERE river_id = ${river_id} aheinecke@5405: teichmann@5522: teichmann@5523: teichmann@5522: aheinecke@5405: aheinecke@5405: aheinecke@5405: teichmann@5523: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: aheinecke@5405: SELECT id AS bedh_id, aheinecke@5405: time_interval_id AS bedh_interval_id, aheinecke@5405: description AS bedh_descr aheinecke@5405: FROM bed_height_epoch WHERE river_id = ${river_id} aheinecke@5405: teichmann@5522: teichmann@5523: teichmann@5522: aheinecke@5405: aheinecke@5405: aheinecke@5405: teichmann@5523: teichmann@5522: ingo@1181: ingo@1181: ingo@1181: sascha@1046: sascha@1046: sascha@1046: User specific part sascha@1046: ------------------ sascha@1046: aheinecke@5598: ingo@1657: teichmann@5523: rrenkert@5015: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: Get the user and collection-id. teichmann@5523: teichmann@5523: SELECT u.id AS user_id, c.id AS collection_id, c.name AS collection_name teichmann@5523: FROM collections c JOIN users u ON c.user_id = u.id teichmann@5523: WHERE u.gid = CAST(${user-id} AS uuid) teichmann@5523: ORDER BY c.creation DESC teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT m.id AS a_id, teichmann@5523: m.state AS a_state, teichmann@5523: m.gid AS a_gid, teichmann@5523: m.creation AS a_creation, teichmann@5523: COALESCE(ld_mode, '') AS ld_m, teichmann@5523: COALESCE(ld_locations, '') AS ld_l, teichmann@5523: COALESCE(ld_from, '') AS ld_f, teichmann@5523: COALESCE(ld_to, '') AS ld_t teichmann@5523: FROM master_artifacts_range m teichmann@5523: WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) teichmann@5523: AND EXISTS ( teichmann@5523: SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: rrenkert@5670: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT m.id AS a_id, teichmann@5523: m.state AS a_state, teichmann@5523: m.gid AS a_gid, teichmann@5523: m.creation AS a_creation, teichmann@5523: ardg.v AS gaugy, teichmann@5523: arv.v AS wqsingle teichmann@5523: FROM master_artifacts m, teichmann@5523: artifact_data ardg, teichmann@5523: artifact_data arv teichmann@5523: WHERE m.collection_id = ${collection_id} teichmann@5523: AND m.gid = CAST(${artifact-id} AS uuid) teichmann@5523: AND ardg.artifact_id = m.id teichmann@5523: AND ardg.k = 'ld_gaugename' teichmann@5523: AND arv.artifact_id = m.id teichmann@5523: AND arv.k = 'wq_single' teichmann@5523: AND EXISTS ( teichmann@5523: SELECT id teichmann@5523: FROM artifact_data ad teichmann@5523: WHERE ad.artifact_id = m.id teichmann@5523: AND k = 'river' teichmann@5523: AND v = ${river}) teichmann@5523: teichmann@5523: felix@3307: felix@3307: felix@3307: SELECT ol.wst_id AS wstid, ol.wst_column_pos AS wstcolpos, ol.name AS olname, ol.value AS oval felix@3307: FROM official_q_values ol felix@3307: WHERE ol.value = CAST(${wqsingle} AS NUMERIC(10,2)) AND ol.gauge_name = ${gaugy} felix@3307: teichmann@5522: felix@3307: felix@3307: felix@3307: felix@3307: felix@3307: teichmann@5522: felix@3307: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: ingo@1657: teichmann@5523: teichmann@5523: SHOW W-DIFFERENCES teichmann@5523: ingo@1657: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: felix@1879: felix@1879: teichmann@5523: SELECT a.gid AS aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description AS facet_description teichmann@5523: FROM outs AS o, facets AS f, artifacts AS a felix@1879: WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} felix@1879: teichmann@5522: felix@1879: felix@1879: teichmann@5523: felix@1879: teichmann@5523: teichmann@5523: felix@1879: teichmann@5522: felix@1879: rrenkert@5015: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: ingo@1657: teichmann@5523: teichmann@5523: SHOW REFERENCE CURVE teichmann@5523: rrenkert@5015: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: felix@2722: felix@2722: teichmann@5523: SELECT a.gid AS aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description AS facet_description teichmann@5523: FROM outs AS o, facets AS f, artifacts AS a felix@2722: WHERE f.name = 'reference_curve' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} felix@2722: teichmann@5522: felix@2722: felix@2722: teichmann@5523: felix@2722: teichmann@5523: teichmann@5523: felix@2722: teichmann@5522: felix@2722: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: felix@2722: teichmann@5523: teichmann@5523: SHOW COMPUTED DISCHARGE CURVES teichmann@5523: felix@2722: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: felix@1880: felix@1880: teichmann@5523: SELECT a.gid AS aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description AS facet_description teichmann@5523: FROM outs AS o, facets AS f, artifacts AS a felix@1880: WHERE f.name = 'computed_discharge_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} felix@1880: teichmann@5522: felix@1880: felix@1880: teichmann@5523: felix@1880: teichmann@5523: teichmann@5523: felix@1880: teichmann@5522: felix@1880: rrenkert@5015: felix@3579: teichmann@5523: teichmann@5523: teichmann@5523: rrenkert@5015: teichmann@5523: teichmann@5523: CROSS SECTION teichmann@5523: rrenkert@5015: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: felix@2690: felix@2690: teichmann@5523: SELECT id AS out_id teichmann@5523: FROM outs teichmann@5523: WHERE artifact_id = ${a_id} AND name = 'cross_section' teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT name AS facet_name, num AS facet_num, description AS facet_description teichmann@5523: FROM facets teichmann@5523: WHERE out_id = ${out_id} teichmann@5523: ORDER BY num ASC, name DESC teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT id AS out_id teichmann@5523: FROM outs teichmann@5523: WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT name AS facet_name, num AS facet_num, description AS facet_description teichmann@5523: FROM facets teichmann@5523: WHERE out_id = ${out_id} teichmann@5523: ORDER BY num ASC, name DESC teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT id AS out_id teichmann@5523: FROM outs teichmann@5523: WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve' teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT name AS facet_name, num AS facet_num, description AS facet_description teichmann@5523: FROM facets teichmann@5523: WHERE out_id = ${out_id} AND ( teichmann@5523: name LIKE 'fix_deviation_ls%' OR teichmann@5523: name LIKE 'fix_sector_average_ls%' OR teichmann@5523: name LIKE 'fix_analysis_events_ls%' OR teichmann@5523: name LIKE 'fix_reference_events_ls%' ) teichmann@5523: ORDER BY num ASC, name DESC teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT id AS out_id teichmann@5523: FROM outs teichmann@5523: WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve' teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT name AS facet_name, num AS facet_num, description AS facet_description teichmann@5523: FROM facets teichmann@5523: WHERE out_id = ${out_id} and ( teichmann@5523: name LIKE 'fix_sector_average_dwt%' OR teichmann@5523: name LIKE 'fix_deviation_dwt%' OR teichmann@5523: name = 'fix_analysis_events_dwt' OR teichmann@5523: name = 'fix_reference_events_dwt' OR teichmann@5523: name = 'fix_analysis_periods_dwt' ) teichmann@5523: ORDER BY num ASC, name DESC teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT id AS out_id teichmann@5523: FROM outs teichmann@5523: WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve' teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT name AS facet_name, num AS facet_num, description AS facet_description teichmann@5523: FROM facets teichmann@5523: WHERE out_id = ${out_id} and name = 'fix_derivate_curve' teichmann@5523: ORDER BY num ASC, name DESC teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT id AS out_id teichmann@5523: FROM outs teichmann@5523: WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve' teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT name AS facet_name, num AS facet_num, description AS facet_description teichmann@5523: FROM facets teichmann@5523: WHERE out_id = ${out_id} and ( teichmann@5523: name LIKE 'fix_sector_average_wq%' OR teichmann@5523: name = 'fix_wq_curve' OR teichmann@5523: name LIKE 'fix_analysis_events_wq%' OR teichmann@5523: name LIKE 'fix_reference_events_wq%' ) teichmann@5523: ORDER BY num ASC, name DESC teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT a.gid AS aid, teichmann@5523: f.id AS fid, teichmann@5523: f.name AS facet_name, teichmann@5523: f.num AS facet_num, teichmann@5523: f.description AS facet_description teichmann@5523: FROM outs AS o, facets AS f, artifacts AS a teichmann@5523: WHERE teichmann@5523: (f.name = 'duration_curve.q' OR f.name = 'duration_curve.w') AND teichmann@5523: f.out_id = o.id AND teichmann@5523: o.artifact_id = ${a_id} AND teichmann@5523: a.id = ${a_id} felix@2690: teichmann@5522: felix@2690: felix@2690: teichmann@5523: felix@2690: teichmann@5523: teichmann@5523: felix@2690: teichmann@5522: felix@2690: rrenkert@5015: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: rrenkert@5015: teichmann@5523: teichmann@5523: WATERLEVELS - ONLY SHOW Ws teichmann@5523: felix@1879: teichmann@5523: rrenkert@5015: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: ingo@2096: ingo@2096: teichmann@5523: SELECT id AS out_id teichmann@5523: FROM outs teichmann@5523: WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT name AS facet_name, num AS facet_num, description AS facet_description teichmann@5523: FROM facets teichmann@5523: WHERE out_id = ${out_id} and name = 'longitudinal_section.w' teichmann@5523: ORDER BY num ASC, name DESC teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SHOW FLOODMAPS teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT a.gid AS aid, teichmann@5523: f.id AS fid, teichmann@5523: f.name AS facet_name, teichmann@5523: f.num AS facet_num, teichmann@5523: f.description AS facet_description teichmann@5523: FROM outs AS o, facets AS f, artifacts AS a teichmann@5523: WHERE f.name = 'floodmap.wsplgen' AND teichmann@5523: f.out_id = o.id AND teichmann@5523: o.artifact_id = ${a_id} AND teichmann@5523: a.id = ${a_id} ingo@2096: teichmann@5522: ingo@2096: ingo@2096: teichmann@5523: ingo@2096: teichmann@5523: teichmann@5523: ingo@2096: teichmann@5522: ingo@2096: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: ingo@2096: teichmann@5523: teichmann@5523: MINFO bedheight difference teichmann@5523: bjoern@4379: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: bjoern@4379: bjoern@4379: teichmann@5523: SELECT a.gid AS aid, teichmann@5523: f.id AS fid, teichmann@5523: f.name AS facet_name, teichmann@5523: f.num AS facet_num, teichmann@5523: f.description AS facet_description teichmann@5523: FROM outs AS o, facets AS f, artifacts AS a teichmann@5523: WHERE ( teichmann@5523: f.name = 'fix_sector_average_ls_0' OR teichmann@5523: f.name = 'fix_sector_average_ls_1' OR teichmann@5523: f.name = 'fix_sector_average_ls_2' OR teichmann@5523: f.name = 'fix_sector_average_ls_3' OR teichmann@5523: f.name = 'fix_analysis_events_ls' OR teichmann@5523: f.name = 'fix_reference_events_ls' teichmann@5523: ) AND f.out_id = o.id AND o.artifact_id = ${a_id} AND a.id = ${a_id} bjoern@4379: teichmann@5523: teichmann@5522: rrenkert@5312: rrenkert@5312: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: rrenkert@5312: teichmann@5522: teichmann@5523: rrenkert@5312: teichmann@5523: rrenkert@5312: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: MINFO bedheight middle teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT a.gid AS aid, teichmann@5523: f.id AS fid, teichmann@5523: f.name AS facet_name, teichmann@5523: f.num AS facet_num, teichmann@5523: f.description AS facet_description teichmann@5523: FROM outs AS o, facets AS f, artifacts AS a teichmann@5523: WHERE ( teichmann@5523: f.name = 'longitudinal_section.w' OR teichmann@5523: f.name = 'heightmarks_points' teichmann@5523: ) AND f.out_id = o.id AND o.artifact_id = ${a_id} AND a.id = ${a_id} teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT id AS out_id teichmann@5523: FROM outs teichmann@5523: WHERE artifact_id = ${a_id} AND name = 'floodmap' teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: SELECT name AS facet_name, teichmann@5523: num AS facet_num, teichmann@5523: description AS facet_description teichmann@5523: FROM facets teichmann@5523: WHERE out_id = ${out_id} AND name = 'floodmap.usershape' teichmann@5523: ORDER BY num ASC, name DESC teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5631: SELECT id AS oid rrenkert@5631: FROM outs AS o rrenkert@5549: WHERE rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: o.name='bed_longitudinal_section' rrenkert@5549: rrenkert@5549: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT a.gid AS aid, rrenkert@5631: f.id AS fid, rrenkert@5631: f.name AS facet_name, rrenkert@5631: f.num AS facet_num, rrenkert@5631: f.description AS facet_description rrenkert@5631: FROM outs AS o, facets AS f, artifacts AS a rrenkert@5631: WHERE rrenkert@5631: (f.name = 'bed_longitudinal_section.bed_diameter_toplayer' rrenkert@5631: OR f.name = 'bed_longitudinal_section.bed_diameter_sublayer') AND rrenkert@5631: f.out_id = o.id AND rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: a.id = ${a_id} rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5631: SELECT id AS oid rrenkert@5631: FROM outs AS o rrenkert@5549: WHERE rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: o.name='bed_longitudinal_section' rrenkert@5549: rrenkert@5549: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT a.gid AS aid, rrenkert@5631: f.id AS fid, rrenkert@5631: f.name AS facet_name, rrenkert@5631: f.num AS facet_num, rrenkert@5631: f.description AS facet_description rrenkert@5631: FROM outs AS o, facets AS f, artifacts AS a rrenkert@5631: WHERE rrenkert@5631: f.name = 'bed_longitudinal_section.bedload_diameter' AND rrenkert@5631: f.out_id = o.id AND rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: a.id = ${a_id} rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5549: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT id AS oid rrenkert@5631: FROM outs AS o rrenkert@5631: WHERE rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: o.name='bed_longitudinal_section' rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT a.gid AS aid, rrenkert@5631: f.id AS fid, rrenkert@5631: f.name AS facet_name, rrenkert@5631: f.num AS facet_num, rrenkert@5631: f.description AS facet_description rrenkert@5631: FROM outs AS o, facets AS f, artifacts AS a rrenkert@5631: WHERE rrenkert@5631: (f.name = 'bed_longitudinal_section.sediment_density_toplayer' OR rrenkert@5631: f.name = 'bed_longitudinal_section.sediment_density_sublayer') AND rrenkert@5631: f.out_id = o.id AND rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: a.id = ${a_id} rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5631: SELECT id AS oid rrenkert@5631: FROM outs AS o rrenkert@5591: WHERE rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: o.name='bed_longitudinal_section' rrenkert@5591: rrenkert@5591: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT a.gid AS aid, rrenkert@5631: f.id AS fid, rrenkert@5631: f.name AS facet_name, rrenkert@5631: f.num AS facet_num, rrenkert@5631: f.description AS facet_description rrenkert@5631: FROM outs AS o, facets AS f, artifacts AS a rrenkert@5631: WHERE rrenkert@5631: (f.name = 'bed_longitudinal_section.porosity_toplayer' OR rrenkert@5631: f.name = 'bed_longitudinal_section.porosity_sublayer') AND rrenkert@5631: f.out_id = o.id AND rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: a.id = ${a_id} rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5631: SELECT id AS oid rrenkert@5631: FROM outs AS o rrenkert@5591: WHERE rrenkert@5631: o.artifact_id = ${a_id} and o.name='flow_velocity' rrenkert@5591: rrenkert@5591: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT a.gid AS aid, rrenkert@5631: f.id AS fid, rrenkert@5631: f.name AS facet_name, rrenkert@5631: f.num AS facet_num, rrenkert@5631: f.description AS facet_description rrenkert@5631: FROM outs AS o, facets AS f, artifacts AS a rrenkert@5631: WHERE rrenkert@5631: (f.name = 'flow_velocity.totalchannel' OR rrenkert@5631: f.name = 'flow_velocity.mainchannel' OR rrenkert@5631: f.name = 'flow_velocity.totalchannel.filtered' OR rrenkert@5631: f.name = 'flow_velocity.mainchannel.filtered') AND rrenkert@5631: f.out_id = o.id AND rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: a.id = ${a_id} rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5591: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT id AS oid rrenkert@5631: FROM outs AS o rrenkert@5631: WHERE rrenkert@5631: o.artifact_id = ${a_id} and o.name='sedimentload_ls' rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT a.gid AS aid, rrenkert@5631: f.id AS fid, rrenkert@5631: f.name AS facet_name, rrenkert@5631: f.num AS facet_num, rrenkert@5631: f.description AS facet_description rrenkert@5631: FROM outs AS o, facets AS f, artifacts AS a rrenkert@5631: WHERE f.name LIKE 'sedimentload%' AND rrenkert@5631: f.out_id = o.id AND rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: a.id = ${a_id} rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT id AS oid, rrenkert@5631: name AS o_name rrenkert@5631: FROM outs AS o rrenkert@5631: WHERE rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: (o.name = 'bed_difference_year' OR rrenkert@5631: o.name = 'bed_differnece_epoch') rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: SELECT a.gid AS aid, rrenkert@5631: f.id AS fid, rrenkert@5631: f.name AS facet_name, rrenkert@5631: f.num AS facet_num, rrenkert@5631: f.description AS facet_description rrenkert@5631: FROM outs AS o, facets AS f, artifacts AS a rrenkert@5631: WHERE (f.name LIKE 'bedheight_difference.year%' OR rrenkert@5631: f.name LIKE 'bedheight_difference.epoch%') AND rrenkert@5631: f.out_id = o.id AND rrenkert@5631: o.artifact_id = ${a_id} AND rrenkert@5631: a.id = ${a_id} rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: SELECT ou.id AS oid rrenkert@5669: FROM outs AS ou, artifacts AS ar rrenkert@5669: WHERE rrenkert@5669: ar.state = 'state.fix.vollmer.compute' AND rrenkert@5669: ou.name = 'longitudinal_section' rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: SELECT a.gid AS aid, rrenkert@5669: f.id AS fid, rrenkert@5669: f.name AS facet_name, rrenkert@5669: f.num AS facet_num, rrenkert@5669: f.description AS facet_description rrenkert@5669: FROM outs AS o, facets AS f, artifacts AS a rrenkert@5669: WHERE f.name = 'longitudinal_section.w' AND rrenkert@5669: f.out_id = o.id AND rrenkert@5669: o.artifact_id = ${a_id} AND rrenkert@5669: a.id = ${a_id} rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: SELECT id AS oid rrenkert@5669: FROM outs AS o rrenkert@5669: WHERE rrenkert@5669: o.artifact_id = ${a_id} AND rrenkert@5669: o.name = 'discharge_longitudinal_section' rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: SELECT a.gid AS aid, rrenkert@5669: f.id AS fid, rrenkert@5669: f.name AS facet_name, rrenkert@5669: f.num AS facet_num, rrenkert@5669: f.description AS facet_description rrenkert@5669: FROM outs AS o, facets AS f, artifacts AS a rrenkert@5669: WHERE f.name = 'discharge_longitudinal_section.w' AND rrenkert@5669: f.out_id = o.id AND rrenkert@5669: o.artifact_id = ${a_id} AND rrenkert@5669: a.id = ${a_id} rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5669: rrenkert@5549: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: rrenkert@5669: rrenkert@5669: teichmann@5523: teichmann@5523: teichmann@5523: teichmann@5523: rrenkert@5549: rrenkert@5549: rrenkert@5591: rrenkert@5549: rrenkert@5591: rrenkert@5591: rrenkert@5549: rrenkert@5591: rrenkert@5591: rrenkert@5549: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5631: rrenkert@5682: rrenkert@5682: rrenkert@5682: rrenkert@5682: rrenkert@5682: rrenkert@5682: teichmann@5523: teichmann@5523: rrenkert@5015: sascha@1046: ingo@1657: teichmann@5523: teichmann@5523: teichmann@5523: Include System specific part when 'load-system' is in parameters. teichmann@5523: ----------------------------------------------------------------- teichmann@5523: teichmann@5523: teichmann@5523: sascha@1046: ingo@1657: sascha@1046: teichmann@5523: teichmann@5523: Include System specific part only if no user ID is given. teichmann@5523: --------------------------------------------------------- teichmann@5523: teichmann@5523: sascha@1046: sascha@1046: teichmann@5523: sascha@1046: sascha@1046: