How to auto-align a LAS and an IFC model?
A question for those in-the-know: how to automatically align a point cloud loaded from LAS with a BIM model loaded from IFC?
LasLoaderPlugin can now load LAS header data. An example of what it loads is shown below, unfortunately without the GeoKey information in this case, since they are not in the sample we're using.
As LASLoaderPlugin loads the LAS points, it scales and translates them by ScaleFactorX, ScaleFactorY and ScaleFactorZ and OffsetX, OffsetY, and OffsetZ, taken from the LAS header data.
Also, once IFC is converted to XKT using our pipeline tools, the model's coordinates are also in their world coordinate system.
So, I assume the task involves determining what the LAS and IFC coordinate systems are, then constructing parameters for a transformation (ie. scale, translate, and maybe rotation) to apply to the SceneModel that represents either the LAS or the XKT (IFC) model, to bring them into alignment?
Imo the auto-align of IFC with LAS can be a challange to achieve in a reliable way for all the possible options. Things to have in mind:
- IFC2x3 doesn't have real geolocation (source: https://www.youtube.com/watch?v=t36cZalPoqw)
- IFC4 allows geolocation -> question then how used library deals with this information, and is it reliable for all exported IFCs from different sources
So far what I've done is just rely on the LAS and IFC to have their coordinates in the same world coordinate system, and haven't applied any transformation to them to align them. A user recently had a dataset consisting of an IFC railway track and a LAS scan, and the two of those magically happened to align perfectly.
It seemed as if they both used the same coordinate system, so that was good enough. I couldn't figure out any way to get geolocation information from the LAS though, there was only mention of a projection in the LAS spec, but no info in the LAS header. But the coordinates matched the IFC.