Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatch in water-lines-casing SQL #939

Closed
pnorman opened this issue Sep 12, 2014 · 0 comments · Fixed by #945
Closed

Mismatch in water-lines-casing SQL #939

pnorman opened this issue Sep 12, 2014 · 0 comments · Fixed by #945
Labels

Comments

@pnorman
Copy link
Collaborator

pnorman commented Sep 12, 2014

The SQL for water-lines-casing is

(SELECT 
    way,waterway,
    CASE WHEN tunnel IN ('yes','culvert') THEN 'yes' ELSE 'no' END AS int_tunnel 
  FROM planet_osm_line
  WHERE waterway IN ('stream','drain','ditch')
    AND (tunnel IS NULL OR tunnel != 'yes')
) AS water_lines_casing

The tunnel condition in the WHERE selects waterways without a tunnel=yes tag, but the case condition targets tunnel=yes. The only time int_tunnel is yes is for tunnel=culvert.

matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue Sep 13, 2014
matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue Sep 21, 2014
matthijsmelissen added a commit to matthijsmelissen/openstreetmap-carto that referenced this issue Sep 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants