Commit 738f2d98 authored by Rick Gruber-Riemer's avatar Rick Gruber-Riemer

New parameter USE_TRAM_LINES

parent c25923a2
......@@ -364,6 +364,9 @@ MAX_SLOPE_ROAD, MAX_SLOPE_* Decimal 0.08 The maximum
higher values (e.g. 0.15 for roads works fine in Switzeland). This leads to
steeper ramps to bridges, but give much fewer residuals with embankments.
USE_TRAM_LINE Boolean False Often tram lines are on top of existing roads or between. This can lead to
roads being (partially) hidden etc.
============================================= ======== ======= ==============================================================================
With residuals:
......
......@@ -260,6 +260,8 @@ HIGHWAY_TYPE_MIN_ROUGH_LOD = 6 # the minimum type tobe added to the rough LOD c
POINTS_ON_LINE_DISTANCE_MAX = 1000 # the maximum distance between two points on a line. If longer, then new points are added
BUILT_UP_AREA_LIT_BUFFER = 20 # the buffer around built-up land-use areas to be used for lighting of streets
USE_TRAM_LINES = False # whether to build tram lines (OSM railway=tram) often they do not merge well with roads
# =============================================================================
# PARAMETERS RELATED TO TEXTURES
......
......@@ -130,6 +130,11 @@ def _is_replaced_bridge(way: osmparser.Way) -> bool:
return REPLACED_BRIDGE_KEY in way.tags
VALID_RAILWAYS = ['rail', 'disused', 'preserved', 'subway', 'narrow_gauge', 'light_rail']
if parameters.USE_TRAM_LINES:
VALID_RAILWAYS.append('tram')
def _is_processed_railway(way):
"""Check whether this is not only a railway, but one that gets processed.
......@@ -138,7 +143,7 @@ def _is_processed_railway(way):
"""
if not osmparser.is_railway(way):
return False
if way.tags['railway'] in ['rail', 'disused', 'preserved', 'subway', 'narrow_gauge', 'tram', 'light_rail']:
if way.tags['railway'] in VALID_RAILWAYS:
return True
return False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment