Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
bug-fix: exclude sidewalks only for roads
Browse files Browse the repository at this point in the history
  • Loading branch information
rush42 committed Dec 12, 2023
1 parent c571fcd commit 7f89c9b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions app/process/roads_bikelanes/roads_bikelanes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,21 @@ function osm2pgsql.process_way(object)
return
end

-- TODO: move to ExcludeHighways
-- TODO: This is in conflict with what we do in RoadClassification, where we have code that is explicit for sidewalks
if tags.footway == 'sidewalk'
or tags.steps == 'sidewalk' then
return
end
-- Keep in line with categories.lua crossing()
if tags.footway == 'crossing' and not (tags.bicycle == "yes" or tags.bicycle == "designated") then
return
end

local results = {}
MergeTable(results, RoadClassification(object))
MergeTable(results, Lit(object))

-- Exlude sidewalks for the road data set
local is_sidewalk = tags.footway == 'sidewalk' or tags.steps == 'sidewalk'
if not is_sidewalk then
MergeTable(results, RoadClassification(object))
MergeTable(results, Lit(object))
MergeTable(results, SurfaceQuality(object))
end
MergeTable(results, Bikelanes(object, results.road))
MergeTable(results, SurfaceQuality(object))
if not PathClasses[tags.highway] then
MergeTable(results, Maxspeed(object))
end
Expand Down

0 comments on commit 7f89c9b

Please sign in to comment.