34 lines
714 B
Python
34 lines
714 B
Python
"""
|
|
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'
|
|
|
|
@property
|
|
def height(self):
|
|
"""
|
|
Get height of tree in meters
|
|
:return: float
|
|
"""
|
|
return self._height
|
|
|
|
@property
|
|
def canopy(self):
|
|
"""
|
|
Get canopy of tree
|
|
:return: Boolean
|
|
"""
|
|
return self._canopy
|