added bixi_feature.py, tree.py and composting_plant.py

This commit is contained in:
pilar 2020-06-16 15:26:55 -04:00
parent f03317e4b5
commit fecf40247a
4 changed files with 81 additions and 16 deletions

View File

@ -0,0 +1,32 @@
"""
bixi_feature module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
from city_model_structure.city_object import CityObject
class BixiFeature(CityObject):
"""
BixiFeature(CityObject) class
"""
def __init__(self, lod, feature_type, length):
super().__init__(lod)
self._feature_type = feature_type
self._length = length
@property
def feature_type(self):
"""
Get type of bixi feature
:return: feature_type
"""
return self._feature_type
@property
def length(self):
"""
Get length of bixi feature in meters
:return: length
"""
return self._length

View File

@ -1,5 +1,5 @@
""" """
CityObject module Building module
SPDX - License - Identifier: LGPL - 3.0 - or -later SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
""" """
@ -22,7 +22,7 @@ from city_model_structure.city_object import CityObject
class Building(CityObject): class Building(CityObject):
""" """
CityObject class Building(CityObject) class
""" """
def __init__(self, name, lod, surfaces, terrains, year_of_construction, function, lower_corner, attic_heated=0, def __init__(self, name, lod, surfaces, terrains, year_of_construction, function, lower_corner, attic_heated=0,
basement_heated=0): basement_heated=0):

View File

@ -0,0 +1,32 @@
"""
Composting plant module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
from city_model_structure.city_object import CityObject
class CompostingPlant(CityObject):
"""
CompostingPlant(CityObject) class
"""
def __init__(self, lod, waste_type, capacity):
super().__init__(lod)
self._waste_type = waste_type
self._capacity = capacity
@property
def waste_type(self):
"""
Get waste_type treated in composting plant
:return: waste_type
"""
return self._waste_type
@property
def capacity(self):
"""
Get capacity of composting plant in kg
:return: capacity
"""
return self._capacity

View File

@ -1,26 +1,28 @@
"""
Tree module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
from city_model_structure.city_object import CityObject
class Tree(CityObject):
"""
Tree(CityObject) class
"""
def __init__(self, lod, height, canopy):
super().__init__(lod)
self._height = height
self._canopy = canopy
@property @property
def height(self): def height(self):
""" """
Get height of tree Get height of tree in meters
:return: height :return: height
""" """
return self._height return self._height
@property @property
def canopy(self): def canopy(self):
""" """
@ -28,4 +30,3 @@
:return: canopy :return: canopy
""" """
return self._canopy return self._canopy