diff --git a/hub/imports/geometry/geojson.py b/hub/imports/geometry/geojson.py index d8ef97f4..d9eadf66 100644 --- a/hub/imports/geometry/geojson.py +++ b/hub/imports/geometry/geojson.py @@ -145,7 +145,7 @@ class Geojson: polygons = self._get_polygons(polygons, coordinates) for zone, polygon in enumerate(polygons): if extrusion_height == 0: - buildings = buildings + Geojson._create_buildings_lod0(f'{building_name}_part_{part}_zone{zone}', + buildings = buildings + Geojson._create_buildings_lod0(f'{building_name}_part_{part}', year_of_construction, function, [polygon]) diff --git a/hub/unittests/test_geometry_factory.py b/hub/unittests/test_geometry_factory.py index a90c58c8..8a2fad0c 100644 --- a/hub/unittests/test_geometry_factory.py +++ b/hub/unittests/test_geometry_factory.py @@ -154,16 +154,17 @@ class TestGeometryFactory(TestCase): """ file = 'neighbours.geojson' city = self._get_city(file, 'geojson', + height_field='citygml_me', year_of_construction_field='ANNEE_CONS', function_field='LIBELLE_UT') GeometryHelper.city_mapping(city) for building in city.buildings: self.assertEqual(2, len(building.neighbours)) - self.assertEqual('2_part_0_zone0_zone_0',city.city_object('1_part_0_zone0_zone_0').neighbours[0].name) - self.assertEqual('3_part_0_zone0_zone_0',city.city_object('1_part_0_zone0_zone_0').neighbours[1].name) - self.assertEqual('1_part_0_zone0_zone_0',city.city_object('2_part_0_zone0_zone_0').neighbours[0].name) - self.assertEqual('3_part_0_zone0_zone_0',city.city_object('2_part_0_zone0_zone_0').neighbours[1].name) - self.assertEqual('2_part_0_zone0_zone_0', city.city_object('3_part_0_zone0_zone_0').neighbours[0].name) - self.assertEqual('1_part_0_zone0_zone_0', city.city_object('3_part_0_zone0_zone_0').neighbours[1].name) + self.assertEqual('2_part_0_zone_0',city.city_object('1_part_0_zone_0').neighbours[0].name) + self.assertEqual('3_part_0_zone_0',city.city_object('1_part_0_zone_0').neighbours[1].name) + self.assertEqual('1_part_0_zone_0',city.city_object('2_part_0_zone_0').neighbours[0].name) + self.assertEqual('3_part_0_zone_0',city.city_object('2_part_0_zone_0').neighbours[1].name) + self.assertEqual('1_part_0_zone_0', city.city_object('3_part_0_zone_0').neighbours[0].name) + self.assertEqual('2_part_0_zone_0', city.city_object('3_part_0_zone_0').neighbours[1].name)