From f1d23a056bfbc76cbafe6655c518ad2a705097d8 Mon Sep 17 00:00:00 2001 From: guille Date: Tue, 17 Aug 2021 12:49:12 -0400 Subject: [PATCH] Idf factory can export now one building in kelowna --- city_model_structure/transport/connection.py | 8 ++- city_model_structure/transport/crossing.py | 52 ++++---------------- city_model_structure/transport/roundabout.py | 13 ++--- 3 files changed, 19 insertions(+), 54 deletions(-) diff --git a/city_model_structure/transport/connection.py b/city_model_structure/transport/connection.py index 6da75dc7..9265a5df 100644 --- a/city_model_structure/transport/connection.py +++ b/city_model_structure/transport/connection.py @@ -3,12 +3,10 @@ Connection 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 +Contributor Guille guille.gutierrezmorote@concordia.ca """ - -from typing import TypeVar - -Edge = TypeVar['Edge'] -Lane = TypeVar['Lane'] +from city_model_structure.attributes.edge import Edge +from city_model_structure.transport.lane import Lane class Connection: diff --git a/city_model_structure/transport/crossing.py b/city_model_structure/transport/crossing.py index 36cecae4..b9673b63 100644 --- a/city_model_structure/transport/crossing.py +++ b/city_model_structure/transport/crossing.py @@ -3,57 +3,23 @@ Crossing 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 +Contributor Guille guille.gutierrezmorote@concordia.ca """ -from typing import List, TypeVar - -Edge = TypeVar['Edge'] -Node = TypeVar['Node'] +from typing import List +from city_model_structure.transport.traffic_node import TrafficNode -class Crossing: +class Crossing(TrafficNode): """ Crossing class """ - def __init__(self): - self._node = None - self._edges = None - self._priority = None - self._width = None - self._shape = None - - @property - def node(self) -> Node: - """ - The node at which this crossing is located - :return: Node - """ - return self._node - - @node.setter - def node(self, value): - """ - The node at which this crossing is located setter - :param value: Node - """ - self._node = value - - @property - def edges(self) -> List[Edge]: - """ - The (road) edges which are crossed - :return: [Edge] - """ - return self._edges - - @edges.setter - def edges(self, value): - """ - The (road) edges which are crossed setter - :param value: [Edge] - """ - self._edges = value + def __init__(self, name, coordinates, priority, width, shape=None, edges=None): + super().__init__(name, coordinates, edges) + self._priority = priority + self._width = width + self._shape = shape @property def priority(self): diff --git a/city_model_structure/transport/roundabout.py b/city_model_structure/transport/roundabout.py index 60427994..1a7791cd 100644 --- a/city_model_structure/transport/roundabout.py +++ b/city_model_structure/transport/roundabout.py @@ -3,20 +3,21 @@ Roundabout 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 +Contributor Guille guille.gutierrezmorote@concordia.ca """ -from typing import List, TypeVar - -Edge = TypeVar['Edge'] +from city_model_structure.transport.traffic_node import TrafficNode +from city_model_structure.attributes.edge import Edge +from typing import List -class Roundabout: +class Roundabout(TrafficNode): """ Roundabout class """ - def __init__(self): - self._edges = None + def __init__(self, name, coordinates, edges=None): + super().__init__(name, coordinates, edges) @property def edges(self) -> List[Edge]: