I’ve never dealt with this issue, but here are some methods I can think of.
IfcSlab.PredefinedType = BASESLAB as “The slab is used to represent a floor slab against the ground (and thereby being a part of the foundation).”
IfcWall.PredefinedType = RETAININGWALL as “A supporting wall used to protect against soil layers behind.”
RelatingBuildingElement = ( IfcSlab | IfcWall), then check if
PredefinedType = ( BASESLAB | RETAININGWALL ).
I would not treat
IfcCovering in a special way, instead an
IfcCovering should always cover another element, and so you should resolve the root element, and then query that element.
Alternatively, perhaps “earth” can be considered as vital to the wall / slab / whatever’s construction. In that case, an
IfcMaterialLayerSet can be applied where there is an
IfcMaterialLayer.Category = Insulation. However, I find this semantically awkward, as it requires a thickness value (even if set to 0, it is strange for me).
Of course another easy alternative is a custom
Pset, but I think this should be avoided if there is a more native way to do it.