diff --git a/imports/geometry/citygml.py b/imports/geometry/citygml.py index 322352ab..f201bffe 100644 --- a/imports/geometry/citygml.py +++ b/imports/geometry/citygml.py @@ -81,7 +81,7 @@ class CityGml: surfaces = CityGmlLod2(city_object).surfaces else: raise NotImplementedError("Not supported level of detail") - return Building(name, lod, surfaces, year_of_construction, function, self._lower_corner,[]) + return Building(name, lod, surfaces, year_of_construction, function, self._lower_corner, []) def _create_parts_consisting_building(self): raise NotImplementedError @@ -101,4 +101,4 @@ class CityGml: raise NotImplementedError("Building cluster") else: self._city.add_city_object(self._create_building(city_object)) - return self._city \ No newline at end of file + return self._city diff --git a/imports/geometry/citygml_base.py b/imports/geometry/citygml_base.py index fba02994..db473e6c 100644 --- a/imports/geometry/citygml_base.py +++ b/imports/geometry/citygml_base.py @@ -1,14 +1,26 @@ +""" +CityGmlBase module abstract class to template the different level of details +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + from abc import ABC import numpy as np from imports.geometry.helpers.geometry_helper import GeometryHelper class CityGmlBase(ABC): + """ + CityGmlBase class inherited by the specific level of detail classes. + """ def __init__(self): self._surfaces = [] @property def surfaces(self): + """ + parsed surfaces + """ return self._surfaces @staticmethod @@ -19,11 +31,6 @@ class CityGmlBase(ABC): @staticmethod def _solid_points(coordinates) -> np.ndarray: - """ - Solid surface point matrix [[x, y, z],[x, y, z],...] - :parameter coordinates: string from file - :return: np.ndarray - """ solid_points = np.fromstring(coordinates, dtype=float, sep=' ') solid_points = GeometryHelper.to_points_matrix(solid_points) return solid_points diff --git a/imports/geometry/citygml_lod1.py b/imports/geometry/citygml_lod1.py index a9cd94a3..7c829442 100644 --- a/imports/geometry/citygml_lod1.py +++ b/imports/geometry/citygml_lod1.py @@ -1,9 +1,18 @@ +""" +CityGmlLod1 module parses citygml files with level of detail 1 and import the geometry into the city model structure +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + from imports.geometry.citygml_base import CityGmlBase from city_model_structure.attributes.surface import Surface from city_model_structure.attributes.polygon import Polygon class CityGmlLod1(CityGmlBase): + """ + CityGmlLod1 class to parse level of detail 1 city gml files + """ @classmethod def _multi_curve(cls, o): diff --git a/imports/geometry/citygml_lod2.py b/imports/geometry/citygml_lod2.py index 0474d16b..bcf26d0b 100644 --- a/imports/geometry/citygml_lod2.py +++ b/imports/geometry/citygml_lod2.py @@ -1,3 +1,9 @@ +""" +CityGmlLod1 module parses citygml files with level of detail 1 and import the geometry into the city model structure +SPDX - License - Identifier: LGPL - 3.0 - or -later +Copyright © 2021 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca +""" + from imports.geometry.citygml_base import CityGmlBase from city_model_structure.attributes.surface import Surface from city_model_structure.attributes.polygon import Polygon @@ -5,7 +11,9 @@ from imports.geometry.helpers.geometry_helper import GeometryHelper class CityGmlLod2(CityGmlBase): - + """ + CityGmlLod1 class to parse level of detail 1 city gml files + """ def __init__(self, o): super().__init__() self._o = o