Skip to content

Commit

Permalink
implement approach 1 with any unknown/invalid access valuses treated …
Browse files Browse the repository at this point in the history
…as yes
  • Loading branch information
imagico committed May 7, 2024
1 parent 42a9e75 commit b2a7a5f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ SELECT
CASE carto_highway_int_highway(highway, bicycle, horse)
WHEN 'road' THEN
carto_int_access('road', CASE
WHEN motorcar <> 'unknown' THEN motorcar
WHEN motor_vehicle <> 'unknown' THEN motor_vehicle
WHEN vehicle <> 'unknown' THEN vehicle
WHEN motorcar IS NOT NULL THEN motorcar
WHEN motor_vehicle IS NOT NULL THEN motor_vehicle
WHEN vehicle IS NOT NULL THEN vehicle
ELSE "access" END)
WHEN 'pedestrian' THEN carto_int_access('pedestrian', CASE WHEN foot <> 'unknown' THEN foot ELSE "access" END)
WHEN 'footway' THEN carto_int_access('footway', CASE WHEN foot <> 'unknown' THEN foot ELSE "access" END)
WHEN 'cycleway' THEN carto_int_access('cycleway', CASE WHEN bicycle <> 'unknown' THEN bicycle ELSE "access" END)
WHEN 'bridleway' THEN carto_int_access('bridleway', CASE WHEN horse <> 'unknown' THEN horse ELSE "access" END)
WHEN 'pedestrian' THEN carto_int_access('pedestrian', CASE WHEN foot IS NOT NULL THEN foot ELSE "access" END)
WHEN 'footway' THEN carto_int_access('footway', CASE WHEN foot IS NOT NULL THEN foot ELSE "access" END)
WHEN 'cycleway' THEN carto_int_access('cycleway', CASE WHEN bicycle IS NOT NULL THEN bicycle ELSE "access" END)
WHEN 'bridleway' THEN carto_int_access('bridleway', CASE WHEN horse IS NOT NULL THEN horse ELSE "access" END)
ELSE carto_int_access(NULL, "access")
END
$$;
Expand Down

0 comments on commit b2a7a5f

Please sign in to comment.