[PATCH] Recognize the 'no-data value' of fromkm and tokm in datacage statement for discharge curves
Wald Commits
scm-commit at wald.intevation.org
Wed Oct 29 16:03:08 CET 2014
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1414594957 -3600
# Node ID 1326fc65638c82e31297108bffb0f83a7549a9ad
# Parent b9a8463ac636e98f58dd80e89f9c4b17d63e6be2
Recognize the 'no-data value' of fromkm and tokm in datacage statement for discharge curves.
diff -r b9a8463ac636 -r 1326fc65638c artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Tue Oct 28 18:52:35 2014 +0100
+++ b/artifacts/doc/conf/meta-data.xml Wed Oct 29 16:02:37 2014 +0100
@@ -1076,8 +1076,9 @@
JOIN discharge_tables dt ON g.id = dt.gauge_id
LEFT JOIN time_intervals t ON dt.time_interval_id = t.id
WHERE g.river_id = ${river_id}
- AND ((g.station BETWEEN ${fromkm} AND ${tokm})
- OR g.official_number = ${refgauge})
+ AND CASE WHEN ${fromkm} > -99999 AND ${tokm} < 99999
+ THEN g.station BETWEEN ${fromkm} AND ${tokm}
+ ELSE g.official_number = ${refgauge} END
ORDER BY start_time
</dc:statement>
</dc:macro>
More information about the Dive4Elements-commits
mailing list