Improve comments
This commit is contained in:
parent
62a1dbbf7f
commit
23360021c3
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user