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

Commit

Permalink
publicTransport: Fix ExitProcessing
Browse files Browse the repository at this point in the history
Every station=signal was added as category=unkown, eg. https://www.openstreetmap.org/node/11361896346

We not exit first for Parkeisenbahn or disused. Then only allow the allowed_tags.
  • Loading branch information
tordans committed Jan 16, 2024
1 parent dd11205 commit e429766
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions app/process/publicTransport.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ local table = osm2pgsql.define_table({
})

local function ExitProcessing(object)
if not (object.tags.railway or object.tags.amenity == "ferry_terminal") then
return true
end

-- ["operator"!= "Berliner Parkeisenbahn"] - a smalll train in a park that we cannot propery exclude by other means
if object.tags.operator == "Berliner Parkeisenbahn" then
return true
Expand All @@ -29,7 +25,18 @@ local function ExitProcessing(object)
return true
end

return false
local allowed_tags = Set({
"subway",
"light_rail",
"tram_stop",
"station",
"halt",
})
if allowed_tags[object.tags.railway] or object.tags.amenity == "ferry_terminal" then
return false
end

return true
end

local function processTags(tags)
Expand Down

0 comments on commit e429766

Please sign in to comment.