Skip to content

Commit 84b1c80

Browse files
committed
Always exclude ways with access no/private
1 parent 1db59a8 commit 84b1c80

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

brokenspoke_analyzer/scripts/sql/features/functional_class.sql

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,25 @@ WHERE
2323
'secondary',
2424
'primary',
2525
'living_street'
26-
);
26+
)
27+
AND (osm.access IS NULL OR osm.access NOT IN ('no', 'private'));
2728

2829
UPDATE neighborhood_ways
2930
SET functional_class = 'track'
3031
FROM neighborhood_osm_full_line AS osm
3132
WHERE
3233
neighborhood_ways.osm_id = osm.osm_id
3334
AND osm.highway = 'track'
34-
AND osm.tracktype = 'grade1';
35+
AND osm.tracktype = 'grade1'
36+
AND (osm.access IS NULL OR osm.access NOT IN ('no', 'private'));
3537

3638
UPDATE neighborhood_ways
3739
SET functional_class = 'path'
3840
FROM neighborhood_osm_full_line AS osm
3941
WHERE
4042
neighborhood_ways.osm_id = osm.osm_id
41-
AND osm.highway IN ('cycleway', 'path');
43+
AND osm.highway IN ('cycleway', 'path')
44+
AND (osm.access IS NULL OR osm.access NOT IN ('no', 'private'));
4245

4346
UPDATE neighborhood_ways
4447
SET
@@ -48,7 +51,8 @@ FROM neighborhood_osm_full_line AS osm
4851
WHERE
4952
neighborhood_ways.osm_id = osm.osm_id
5053
AND osm.highway = 'footway'
51-
AND osm.footway IN ('crossing', 'traffic_island');
54+
AND osm.footway IN ('crossing', 'traffic_island')
55+
AND (osm.access IS NULL OR osm.access NOT IN ('no', 'private'));
5256

5357
UPDATE neighborhood_ways
5458
SET functional_class = 'path'
@@ -66,7 +70,8 @@ FROM neighborhood_osm_full_line AS osm
6670
WHERE
6771
neighborhood_ways.osm_id = osm.osm_id
6872
AND osm.highway = 'service'
69-
AND osm.bicycle IN ('yes', 'permissive', 'designated');
73+
AND osm.bicycle IN ('yes', 'permissive', 'designated')
74+
AND (osm.access IS NULL OR osm.access NOT IN ('no', 'private'));
7075

7176
UPDATE neighborhood_ways
7277
SET functional_class = 'living_street'

0 commit comments

Comments
 (0)