system_assignation/city_model_structure/tree.py

34 lines
714 B
Python
Raw Normal View History

"""
Tree module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2020 Project Author Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
"""
from city_model_structure.city_object import CityObject
class Tree(CityObject):
"""
Tree(CityObject) class
"""
def __init__(self, lod, surfaces, name, height, canopy):
super().__init__(lod, surfaces, name, [])
self._height = height
self._canopy = canopy
self._type = 'tree'
2020-06-16 15:14:23 -04:00
@property
def height(self):
"""
Get height of tree in meters
:return: float
2020-06-16 15:14:23 -04:00
"""
return self._height
@property
def canopy(self):
"""
Get canopy of tree
:return: Boolean
2020-06-16 15:14:23 -04:00
"""
return self._canopy