Skip to content

Commit f42b018

Browse files
committed
ifccityjson: more appropriate conversion of classes from cityjson to ifc
1 parent dff91e2 commit f42b018

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

src/ifccityjson/cityjson2ifc.py

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,20 @@
2424

2525
JSON_TO_IFC = {
2626
"Building": ["IfcBuilding"],
27-
"BuildingPart": ["IfcBuilding", {"CompositionType": "Partial"}], # CompositionType: Partial
28-
"BuildingInstallation": ["IfcDistributionElement"],
29-
"Road": ["IfcCivilElement"],
30-
"TransportSquare": ["IfcSpace"],
31-
"TINRelief": ["IfcGeographicElement"],
32-
"WaterBody": ["IfcGeographicElement"], # Update for IFC4.3
33-
"LandUse": ["IfcGeographicElement"],
34-
"PlantCover": ["IfcGeographicElement"],
35-
"SolitaryVegetationObject": ["IfcGeographicElement"],
27+
"BuildingPart": ["IfcBuilding", {"CompositionType": "Partial"}],
28+
"BuildingInstallation": ["IfcBuildingElementProxy"],
29+
"Road": ["IfcCivilElement"], # Update for IFC4.3
30+
"Railway": ["IfcCivilElement"], # Update for IFC4.3
31+
"TransportSquare": ["IfcCivilElement"], # Update for IFC4.3
32+
"TINRelief": ["IfcGeographicElement", {"PredefinedType": "TERRAIN"}],
33+
"WaterBody": ["IfcGeographicElement", {"PredefinedType": "USERDEFINED",
34+
"ObjectType": "WaterBody"}], # Update for IFC4.3
35+
"LandUse": ["IfcGeographicElement", {"PredefinedType": "USERDEFINED",
36+
"ObjectType": "LandUse"}],
37+
"PlantCover": ["IfcGeographicElement", {"PredefinedType": "USERDEFINED",
38+
"ObjectType": "Plantcover"}],
39+
"SolitaryVegetationObject": ["IfcGeographicElement", {"PredefinedType": "USERDEFINED",
40+
"ObjectType": "SolitaryVegetationObject"}],
3641
"CityFurniture": ["IfcFurnishingElement"],
3742
"GenericCityObject": ["IfcCivilElement"],
3843
"Bridge": ["IfcCivilElement"], # Update for IFC4.3
@@ -42,7 +47,7 @@
4247
"Tunnel": ["IfcCivilElement"], # Update for IFC4.3
4348
"TunnelPart": ["IfcCivilElement"], # Update for IFC4.3
4449
"TunnelInstallation": ["IfcCivilElement"], # Update for IFC4.3
45-
"CityObjectGroup": ["IfcCivilElement"],
50+
"CityObjectGroup": ["IfcBuilding"], # Update for IFC4.3
4651
"GroundSurface": ["IfcSlab", {"PredefinedType": "BASESLAB"}],
4752
"RoofSurface": ["IfcRoof"],
4853
"WallSurface": ["IfcWall"],
@@ -51,9 +56,12 @@
5156
"OuterFloorSurface": ["IfcSlab", {"PredefinedType": "FLOOR"}],
5257
"Window": ["IfcWindow"],
5358
"Door": ["IfcDoor"],
54-
"WaterSurface": ["IfcGeographicElement"], # Update for IFC4.3
55-
"WaterGroundSurface": ["IfcGeographicElement"], # Update for IFC4.3
56-
"WaterClosureSurface": ["IfcGeographicElement"], # Update for IFC4.3
59+
"WaterSurface": ["IfcGeographicElement", {"PredefinedType": "USERDEFINED",
60+
"ObjectType": "WaterSurface"}], # Update for IFC4.3
61+
"WaterGroundSurface": ["IfcGeographicElement", {"PredefinedType": "USERDEFINED",
62+
"ObjectType": "WaterGroundSurface"}], # Update for IFC4.3
63+
"WaterClosureSurface": ["IfcGeographicElement", {"PredefinedType": "USERDEFINED",
64+
"ObjectType": "WaterClosureSurface"}], # Update for IFC4.3
5765
"TrafficArea": ["IfcCivilElement"], # Update for IFC4.3
5866
"AuxiliaryTrafficArea": ["IfcCivilElement"] # Update for IFC4.3
5967
}

0 commit comments

Comments
 (0)