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
|
from unittest import TestCase
|
||||||
|
|
||||||
import hub.exports.exports_factory
|
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.helpers.geometry_helper import GeometryHelper
|
||||||
from hub.imports.construction_factory import ConstructionFactory
|
from hub.imports.construction_factory import ConstructionFactory
|
||||||
from hub.imports.geometry_factory import GeometryFactory
|
from hub.imports.geometry_factory import GeometryFactory
|
||||||
|
@ -36,6 +36,7 @@ class TestGeometryFactory(TestCase):
|
||||||
height_field=height_field,
|
height_field=height_field,
|
||||||
year_of_construction_field=year_of_construction_field,
|
year_of_construction_field=year_of_construction_field,
|
||||||
function_field=function_field,
|
function_field=function_field,
|
||||||
|
function_to_hub=Dictionaries().montreal_function_to_hub_function
|
||||||
).city
|
).city
|
||||||
self.assertIsNotNone(self._city, 'city is none')
|
self.assertIsNotNone(self._city, 'city is none')
|
||||||
return self._city
|
return self._city
|
||||||
|
@ -104,6 +105,7 @@ class TestGeometryFactory(TestCase):
|
||||||
"""
|
"""
|
||||||
file = 'FZK_Haus_LoD_2.gml'
|
file = 'FZK_Haus_LoD_2.gml'
|
||||||
city = self._get_city(file, 'citygml')
|
city = self._get_city(file, 'citygml')
|
||||||
|
print('test')
|
||||||
self.assertTrue(len(city.buildings) == 1)
|
self.assertTrue(len(city.buildings) == 1)
|
||||||
self._check_buildings(city)
|
self._check_buildings(city)
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
|
@ -132,7 +134,7 @@ class TestGeometryFactory(TestCase):
|
||||||
year_of_construction_field='ANNEE_CONS',
|
year_of_construction_field='ANNEE_CONS',
|
||||||
aliases_field=['ID_UEV', 'CIVIQUE_DE', 'NOM_RUE'],
|
aliases_field=['ID_UEV', 'CIVIQUE_DE', 'NOM_RUE'],
|
||||||
function_field='CODE_UTILI',
|
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()
|
hub.exports.exports_factory.ExportsFactory('obj', city, self._output_path).export()
|
||||||
for building in city.building_alias('01002777'):
|
for building in city.building_alias('01002777'):
|
||||||
self.assertEqual('1', building.name, 'Wrong building name when looking for alias')
|
self.assertEqual('1', building.name, 'Wrong building name when looking for alias')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user