From 9d921da698a1661d8337e785e8afc3cf48d1f95d Mon Sep 17 00:00:00 2001 From: Guille Date: Mon, 22 Jun 2020 13:46:41 -0400 Subject: [PATCH] Implement lod2 --- geometry/geometry_feeders/city_gml.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/geometry/geometry_feeders/city_gml.py b/geometry/geometry_feeders/city_gml.py index 09eaa268..e75777b6 100644 --- a/geometry/geometry_feeders/city_gml.py +++ b/geometry/geometry_feeders/city_gml.py @@ -81,18 +81,18 @@ class CityGml: if 'lod1Solid' in o['Building']: lod += 1 surfaces = self._lod1(o) - - for bound in o['Building']['boundedBy']: - surface_type = next(iter(bound)) - if 'lod2MultiSurface' in bound[surface_type]: - start = datetime.utcnow() - lod = 2 - surfaces = CityGml._lod2(bound) - print('lod2 ', surface_type, datetime.utcnow() - start) - if 'lod3Solid' in o['Building']: - lod += 4 - if 'lod4Solid' in o['Building']: - lod += 8 + else: + for bound in o['Building']['boundedBy']: + surface_type = next(iter(bound)) + if 'lod2MultiSurface' in bound[surface_type]: + start = datetime.utcnow() + lod = 2 + surfaces = CityGml._lod2(bound) + print('lod2 ', surface_type, datetime.utcnow() - start) + if 'lod3Solid' in o['Building']: + lod += 4 + if 'lod4Solid' in o['Building']: + lod += 8 name = o['Building']['@id']