mirror of
https://github.com/DerTyp7/local-analyzer-python.git
synced 2025-10-28 12:02:10 +01:00
41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
|
|
class PublicTransportAccessibility:
|
|
# TODO count of each Ttransport type
|
|
def __init__(self, _osm):
|
|
self.osm = _osm
|
|
|
|
def isBusAccessible(self):
|
|
for tag in self.osm.nodeTagList:
|
|
if tag.key == "highway" and tag.value == "bus_stop":
|
|
return True
|
|
return False
|
|
|
|
def isTramAccessible(self):
|
|
for tag in self.osm.nodeTagList:
|
|
if tag.key == "railway" and tag.value == "tram_stop":
|
|
return True
|
|
return False
|
|
|
|
def isTrainAccessible(self):
|
|
for tag in self.osm.nodeTagList:
|
|
if tag.key == "railway" and tag.value == "station":
|
|
return True
|
|
return False
|
|
|
|
def isLightRailAccessible(self):
|
|
for tag in self.osm.nodeTagList:
|
|
if tag.key == "station" and tag.value == "light_rail":
|
|
return True
|
|
return False
|
|
|
|
def isSubwayAccessible(self):
|
|
for tag in self.osm.nodeTagList:
|
|
if tag.key == "station" and tag.value == "subway":
|
|
return True
|
|
return False
|
|
|
|
def isMonorailAccessible(self):
|
|
for tag in self.osm.nodeTagList:
|
|
if tag.key == "station" and tag.value == "monorail":
|
|
return True
|
|
return False |