Skip to content

Commit 60e9008

Browse files
lalver1rgreinho
authored andcommitted
Add off-street paths to measure (#870)
Add off-street paths to measure calculation Signed-off-by: Rémy Greinhofer <remy.greinhofer@gmail.com>
1 parent 1a85de1 commit 60e9008

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

brokenspoke_analyzer/scripts/sql/features/calculate_mileage.sql

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,21 @@ FROM (
2222
LATERAL (
2323
VALUES
2424
(neighborhood_ways.ft_bike_infra),
25-
(neighborhood_ways.tf_bike_infra)
25+
(neighborhood_ways.tf_bike_infra),
26+
(
27+
CASE
28+
WHEN
29+
(
30+
neighborhood_ways.functional_class = 'path'
31+
AND neighborhood_ways.xwalk IS NULL
32+
)
33+
THEN 'path'
34+
END
35+
)
2636
) AS features (feature_type)
27-
WHERE features.feature_type IN ('sharrow', 'buffered_lane', 'lane', 'track')
37+
WHERE
38+
features.feature_type IN (
39+
'sharrow', 'buffered_lane', 'lane', 'track', 'path'
40+
)
2841
) AS all_features
2942
GROUP BY all_features.feature_type;

0 commit comments

Comments
 (0)