fix: small issue in the city creator was resolved
This commit is contained in:
parent
1cc7b2cb8c
commit
1279dffff8
@ -8,7 +8,7 @@ from pathlib import Path
|
||||
from unittest import TestCase
|
||||
|
||||
import hub.exports.exports_factory
|
||||
from hub.helpers.dictionaries import MontrealFunctionToHubFunction
|
||||
from hub.helpers.dictionaries import Dictionaries
|
||||
from hub.helpers.geometry_helper import GeometryHelper
|
||||
from hub.imports.construction_factory import ConstructionFactory
|
||||
from hub.imports.geometry_factory import GeometryFactory
|
||||
@ -36,6 +36,7 @@ class TestGeometryFactory(TestCase):
|
||||
height_field=height_field,
|
||||
year_of_construction_field=year_of_construction_field,
|
||||
function_field=function_field,
|
||||
function_to_hub=Dictionaries().montreal_function_to_hub_function
|
||||
).city
|
||||
self.assertIsNotNone(self._city, 'city is none')
|
||||
return self._city
|
||||
@ -104,6 +105,7 @@ class TestGeometryFactory(TestCase):
|
||||
"""
|
||||
file = 'FZK_Haus_LoD_2.gml'
|
||||
city = self._get_city(file, 'citygml')
|
||||
print('test')
|
||||
self.assertTrue(len(city.buildings) == 1)
|
||||
self._check_buildings(city)
|
||||
for building in city.buildings:
|
||||
@ -132,7 +134,7 @@ class TestGeometryFactory(TestCase):
|
||||
year_of_construction_field='ANNEE_CONS',
|
||||
aliases_field=['ID_UEV', 'CIVIQUE_DE', 'NOM_RUE'],
|
||||
function_field='CODE_UTILI',
|
||||
function_to_hub=MontrealFunctionToHubFunction().dictionary).city
|
||||
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
|
||||
hub.exports.exports_factory.ExportsFactory('obj', city, self._output_path).export()
|
||||
for building in city.building_alias('01002777'):
|
||||
self.assertEqual('1', building.name, 'Wrong building name when looking for alias')
|
||||
|
Loading…
Reference in New Issue
Block a user