diff --git a/imports/geometry/citygml.py b/imports/geometry/citygml.py index f6d170bb..b75f9272 100644 --- a/imports/geometry/citygml.py +++ b/imports/geometry/citygml.py @@ -104,10 +104,14 @@ class CityGml: if self._city is None: self._city = City(self._lower_corner, self._upper_corner, self._srs_name) + i = 0 for o in self._gml['CityModel']['cityObjectMember']: + i += 1 city_object = o['Building'] if 'consistsOfBuildingPart' in city_object: self._city.add_city_objects_cluster(self._create_parts_consisting_building(city_object)) else: self._city.add_city_object(self._create_building(city_object)) + if i < 4: + break return self._city diff --git a/imports/geometry/citygml_classes/citygml_lod2.py b/imports/geometry/citygml_classes/citygml_lod2.py index 768490ad..3ecd687e 100644 --- a/imports/geometry/citygml_classes/citygml_lod2.py +++ b/imports/geometry/citygml_classes/citygml_lod2.py @@ -32,7 +32,6 @@ class CityGmlLod2(CityGmlBase): def _surface_encoding(surfaces): if 'lod2MultiSurface' in surfaces: return 'lod2MultiSurface', 'MultiSurface' - print(surfaces) raise NotImplementedError('unknown surface type') @classmethod @@ -46,7 +45,7 @@ class CityGmlLod2(CityGmlBase): try: surface_encoding, surface_subtype = cls._surface_encoding(b[surface_type]) except NotImplementedError: - print("Ignore bounded") + continue for member in b[surface_type][surface_encoding][surface_subtype]['surfaceMember']: if '@srsDimension' in member['Polygon']['exterior']['LinearRing']['posList']: diff --git a/non_functional_tests/test_geometry_factory.py b/non_functional_tests/test_geometry_factory.py index cf9e74ce..dd049137 100644 --- a/non_functional_tests/test_geometry_factory.py +++ b/non_functional_tests/test_geometry_factory.py @@ -51,7 +51,7 @@ class TestGeometryFactory(TestCase): # citygml_classes def test_stuttgart_gml(self): - file = 'ConcordiaSWGcampus.gml' + file = 'concordia.gml' city = self._get_citygml(file) print(f'city name: {city}') for building in city.buildings: