Correct bug in geojson naming
This commit is contained in:
parent
bfc3f84c09
commit
fdb9f4d834
|
@ -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])
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user