HasCoordinateOperation constraint to all contexts cannot be satisfied

The docs state:

Indicates conversion between coordinate systems. In particular it refers to an IfcCoordinateOperation between a Geographic map coordinate reference system, and the engineering coordinate system of this construction project. If there is more then one IfcGeometricRepresentationContext provided to the IfcProject then all contexts shall have an identical instance of IfcCoordinateOperation as HasCoordinateOperation refering to the same instance of IfcCoordinateReferenceSystem.

HasCoordinateOperation is an inverse attribute, which points to an IfcCoordinateOperation (i.e. an IfcMapConversion. Specifically, the SourceCRS refers to the IfcGeometricRepresentationContext, and the TargetCRS refers to the IfcProjectedCRS.

Therefore, it is impossible to have an identical instance of IfcCoordinateOperation. You will need a newIfcMapConversion per context. This is, well, not very good. All contexts should have the same map conversion, unless you want users brains to explode :slight_smile:

An additional impact of this is that it becomes mandatory to have an IfcMapConversion, otherwise your IfcProjectedCRS is not going to be linked to your context. (Note: technically speaking you could have an IfcProjectedCRS without an IfcMapConversion but the entity is unrelated, which is also pretty poor). Some might argue that this is not quite correct, as in theory you might want a situation where you have an IfcProjectedCRS without any conversion (i.e. your geometric context is already in the map CRS). This happens a lot of civil / infrastructure projects, I would imagine.

Funnily enough, it is also exactly in this scenario which makes the true north attribute a bit meaningless, since it is no longer clear which easting / northing is being specified.