hub/city_model_structure/transport/node.py
Pilar 2d71136d33 Added first version of traffic classes.
Reorganized classes inside "attributes" into different folders by topic.
2021-08-06 12:28:20 -04:00

93 lines
1.7 KiB
Python

"""
Node module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
Contributor Milad milad.aghamohamadnia@concordia.ca
"""
class Node:
"""
Node class
"""
def __init__(self):
self._id = None
self._x = None
self._y = None
self._z = None
self._type = None
@property
def id(self):
"""
Node id
:return: str
"""
return self._id
@id.setter
def id(self, value):
"""
Node id setter
:param value: str
"""
self._id = value
@property
def x(self):
"""
The x-position of the node on the plane in m
:return: float
"""
return self._x
@x.setter
def x(self, value):
"""
The x-position of the node on the plane in m setter
:param value: float
"""
self._x = value
@property
def y(self):
"""
The y-position of the node on the plane in m
:return: float
"""
return self._y
@y.setter
def y(self, value):
"""
The y-position of the node on the plane in m setter
:param value: float
"""
self._y = value
@property
def z(self):
"""
The z-position of the node on the plane in m
:return: float
"""
return self._z
@z.setter
def z(self, value):
"""
The z-position of the node on the plane in m setter
:param value: float
"""
self._z = value
@property
def type(self):
"""
Type
enum ( "priority", "traffic_light", "right_before_left", "unregulated", "priority_stop", "traffic_light_unregulated", "allway_stop", "rail_signal", "zipper", "traffic_light_right_on_red", "rail_crossing")
:return: enum
"""
return self._type