mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 07:28:38 +00:00
Include GenericCityObject extension
This commit is contained in:
committed by
Thomas Krijnen
parent
24ea024a0d
commit
16cda28d16
@@ -47,6 +47,7 @@ JSON_TO_IFC = {
|
|||||||
"ObjectType": "SolitaryVegetationObject"}],
|
"ObjectType": "SolitaryVegetationObject"}],
|
||||||
"CityFurniture": ["IfcFurnishingElement"],
|
"CityFurniture": ["IfcFurnishingElement"],
|
||||||
"OtherConstruction": ["IfcCivilElement"],
|
"OtherConstruction": ["IfcCivilElement"],
|
||||||
|
"+GenericCityObject": ["IfcCivilElement"], # We make an exception here, because GenericCityObject is a remnant from CityJSON v1.0, which was moved to an extension in v1.1 and it is commonly used.
|
||||||
"Bridge": ["IfcCivilElement"], # Update for IFC4.3
|
"Bridge": ["IfcCivilElement"], # Update for IFC4.3
|
||||||
"BridgePart": ["IfcCivilElement"], # Update for IFC4.3
|
"BridgePart": ["IfcCivilElement"], # Update for IFC4.3
|
||||||
"BridgeInstallation": ["IfcCivilElement"], # Update for IFC4.3
|
"BridgeInstallation": ["IfcCivilElement"], # Update for IFC4.3
|
||||||
@@ -236,7 +237,11 @@ class Cityjson2ifc:
|
|||||||
geometries = {}
|
geometries = {}
|
||||||
for obj_id, obj in self.city_model.get_cityobjects().items():
|
for obj_id, obj in self.city_model.get_cityobjects().items():
|
||||||
# CityJSON type to class
|
# CityJSON type to class
|
||||||
mapping = JSON_TO_IFC[obj.type]
|
try:
|
||||||
|
mapping = JSON_TO_IFC[obj.type]
|
||||||
|
except KeyError:
|
||||||
|
# skip CityObject types that are not supported, eg. from extensions
|
||||||
|
continue
|
||||||
IFC_class = mapping[0]
|
IFC_class = mapping[0]
|
||||||
data = {}
|
data = {}
|
||||||
# Add attributes if it is specified in mapping
|
# Add attributes if it is specified in mapping
|
||||||
|
|||||||
Reference in New Issue
Block a user