From f90eca852d01b2a08e7339e423d42830b7cfa50d Mon Sep 17 00:00:00 2001 From: Dan Stowell Date: Mon, 1 Apr 2013 10:53:19 +0100 Subject: [PATCH 1/2] waterways: render tunnel=culvert like tunnel=yes (fixes #3341) --- inc/layer-water.xml.inc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/inc/layer-water.xml.inc b/inc/layer-water.xml.inc index f819bc4..59000c2 100644 --- a/inc/layer-water.xml.inc +++ b/inc/layer-water.xml.inc @@ -177,14 +177,14 @@ - [waterway]='river' and [tunnel] = 'yes' + [waterway]='river' and ([tunnel] = 'yes' or [tunnel] = 'culvert') &maxscale_zoom14; &minscale_zoom14; [name] - [waterway]='river' and [tunnel] = 'yes' + [waterway]='river' and ([tunnel] = 'yes' or [tunnel] = 'culvert') &maxscale_zoom15; &minscale_zoom16; @@ -192,7 +192,7 @@ [name] - [waterway]='river' and [tunnel] = 'yes' + [waterway]='river' and ([tunnel] = 'yes' or [tunnel] = 'culvert') &maxscale_zoom17; &minscale_zoom17; @@ -200,14 +200,14 @@ [name] - [waterway]='river' and [tunnel] = 'yes' + [waterway]='river' and ([tunnel] = 'yes' or [tunnel] = 'culvert') &maxscale_zoom18; [name] - [waterway]='canal' and [tunnel] = 'yes' + [waterway]='canal' and ([tunnel] = 'yes' or [tunnel] = 'culvert') &maxscale_zoom14; &minscale_zoom16; @@ -215,14 +215,14 @@ [name] - [waterway]='canal' and not ([tunnel] = 'yes' or [disused]='yes') + [waterway]='canal' and not ([tunnel] = 'yes' or [tunnel] = 'culvert' or [disused]='yes') &maxscale_zoom14; &minscale_zoom16; [name] - [waterway]='canal' and [tunnel] = 'yes' + [waterway]='canal' and ([tunnel] = 'yes' or [tunnel] = 'culvert') &maxscale_zoom17; &minscale_zoom18; @@ -230,14 +230,14 @@ [name] - [waterway]='canal' and not ([tunnel] = 'yes' or [disused]='yes' or [lock]='yes') + [waterway]='canal' and not ([tunnel] = 'yes' or [tunnel] = 'culvert' or [disused]='yes' or [lock]='yes') &maxscale_zoom17; &minscale_zoom18; [name] - [waterway]='canal' and not ([tunnel] = 'yes' or [disused]='yes') and [lock]='yes' + [waterway]='canal' and not ([tunnel] = 'yes' or [tunnel] = 'culvert' or [disused]='yes') and [lock]='yes' &maxscale_zoom17; &minscale_zoom18; From 9d00ef2d6f8939dd643bc7c3cf16d0c43dbacc1b Mon Sep 17 00:00:00 2001 From: Dan Stowell Date: Sat, 8 Jun 2013 23:32:50 +0100 Subject: [PATCH 2/2] Also handle culvert for streams and ditches (thanks @xkomczax) --- inc/layer-water.xml.inc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inc/layer-water.xml.inc b/inc/layer-water.xml.inc index 59000c2..8e147f7 100644 --- a/inc/layer-water.xml.inc +++ b/inc/layer-water.xml.inc @@ -264,28 +264,28 @@ [name] - [waterway]='stream' and [tunnel]='yes' + [waterway]='stream' and ([tunnel]='yes' or [tunnel]='culvert') &maxscale_zoom15; &minscale_zoom18; - [waterway]='stream' and not [tunnel]='yes' + [waterway]='stream' and not ([tunnel]='yes' or [tunnel]='culvert') &maxscale_zoom15; &minscale_zoom18; [name] - ([waterway]='drain' or [waterway]='ditch') and [tunnel]='yes' + ([waterway]='drain' or [waterway]='ditch') and ([tunnel]='yes' or [tunnel] = 'culvert') &maxscale_zoom15; &minscale_zoom18; - ([waterway]='drain' or [waterway]='ditch') and not [tunnel]='yes' + ([waterway]='drain' or [waterway]='ditch') and not ([tunnel]='yes' or [tunnel] = 'culvert') &maxscale_zoom15; &minscale_zoom18; @@ -300,7 +300,7 @@ (select way,waterway from &prefix;_line where waterway in ('stream','drain','ditch') - and (tunnel is null or tunnel != 'yes') + and (tunnel is null or (tunnel != 'yes' and tunnel != 'culvert')) ) as water_lines &datasource-settings; @@ -363,7 +363,7 @@ (select way,waterway,disused,lock,name, - case when tunnel in ('yes','true','1') then 'yes'::text else tunnel end as tunnel + case when tunnel in ('yes','true','1','culvert') then 'yes'::text else tunnel end as tunnel from &prefix;_line where waterway in ('weir','river','canal','derelict_canal','stream','drain','ditch','wadi') and (bridge is null or bridge not in ('yes','true','1','aqueduct'))