This scenario demonstrates how you can use LuciadFusion to serve IFC data to clients.

See the IFC data format documentation for general information about the IFC data format.

Setting up IFC services in LuciadFusion Studio

Preparing your data

Add georeference information

To prepare the IFC data for serving by LuciadFusion Studio, and later on for visualization by clients, you need to make sure that georeference information is available for the data. If LuciadFusion can’t detect georeference information, it won’t make the data available in LuciadFusion Studio for serving.

Adding georeference information

Georeference information for IFC data is typically provided in a .llh, .ref, .prj or .epsg file with the same name as the geodata file.

.llh files contain longitude, latitude and height, defined in the default EPSG 4326 reference.

Combine multiple IFC datasets

Often, a project is split into multiple IFC files, that each contain part of the data. For instance, one file has the steel structure, another file has the electrical installations, and so on.

You can create a separate OGC3DTILES service for each file, and combine them in the client application. Sometimes, you want to handle them as a single dataset though. The tutorial How to combine multiple IFC files into one OGC 3D Tiles dataset describes how you can do that.

Adding the data

For your options to add the IFC data sources to LuciadFusion, see Adding your data

Once LuciadFusion Studio has recognized the IFC data, you can find it in the DATA tab of LuciadFusion Studio.

IFC data in Studio
Figure 1. IFC data in Studio

The page lists two entries for each .ifc and .ifc.index file:

  • An entry for the geometry: this entry has a title ending in "[GEOMETRY]"

    Geometry data visible as a red hatched shape in the Studio map preview

    The map preview in LuciadFusion only shows a red hatched rectangle at the location of the data set. A client with full 3D visualization capabilities is required to show the IFC data after it has been processed as OGC 3D Tiles.

  • An entry for the feature information: this entry has a title ending in "[FEATURES]"

Setting up services

You serve the two DATA entries for an IFC dataset through two distinct services.

Setting up an OGC3DTILES service

OGC 3D Tiles is the optimal format for the distribution and visualization of big 3D mesh data sets because it tiles and multi-levels the data. The tiling and multi-leveling process makes the data more usable in visualization clients, because the client can select a suitable level-of-detail in the data, and reduce the amount of data that needs to be loaded. Web services can also cache the tiles for fast retrieval.

To create the OGC3DTILES service:

  1. Select the [GEOMETRY] data set on the DATA screen.

  2. Click CREATE SERVICE.

  3. Enter a service title and name in the Create service dialog, and select the OGC3DTILES service type.

  4. Leave the Start service? check box selected, and click CREATE SERVICE.

Setting up the OGC3DTILES service
Figure 2. Setting up the OGC3DTILES service

At this point, LuciadFusion Studio starts creating the OGC 3D Tiles data. While it’s taking care of this pre-processing job, your new service will have the PENDING status.

The pre-processing may take a while if you loaded a large data set. To track the status of the pre-processing job, you can go to the JOBS screen. It shows the running pre-processing job in the lower half of the screen. You can click the job entry for more details.

The job runs on your LuciadFusion Studio machine and can be quite resource-intensive. You can pause and resume it if necessary.

Monitoring progress of the pre-processing job
Figure 3. Monitoring progress of the pre-processing job

As soon as the pre-processing job is done, the OGC3DTILES service status switches from PENDING to RUNNING. In the preview window, you again see a hatched shape at the location of the data set.

The OGC3DTILES service is running
Figure 4. The OGC3DTILES service is running

The details screen of the service also lists the ENDPOINT URL that you need in a client application such as LuciadRIA. See Connecting to the IFC services with LuciadRIA.

Setting up a WFS service

An OGC Web Feature Service (WFS) service can serve information on features. For more information, refer to the WFS service documentation.

To create the WFS service:

  1. Select the [FEATURES] data set on the DATA screen.

  2. Click CREATE SERVICE.

  3. Enter a service title and name in the Create service dialog, and select the WFS service type.

  4. Leave the Start service? check box selected, and click CREATE SERVICE.

Setting up the WFS service
Figure 5. Setting up the WFS service

The SERVICES page lists the newly created service. Click on the service to open the details screen. Here, you find the ENDPOINT URL that you need in a client application such as LuciadRIA. See Connecting to the IFC services with LuciadRIA.

The WFS service is running
Figure 6. The WFS service is running

Connecting to the IFC services with LuciadRIA

You are now ready to use the data in client applications, such as LuciadRIA applications.

You need the endpoint URLs of both services. You can find them in the details screens of the services, as explained in Setting up an OGC3DTILES service and Setting up a WFS service.

See the LuciadRIA documentation on handling IFC for detailed information about working with the data. You can use these snippets for getting started:

Create a layer for the OGC 3D Tiles service

Program: Creating a TileSet3DLayer
const tilesetUrl = "https://fusionurl/ogc/3dtiles/building/tileset.json";
const model: OGC3DTilesModel = await OGC3DTilesModel.create(tilesetUrl);
const ogc3dTilesLayer = new TileSet3DLayer(model, {
  idProperty: "FeatureID",
  selectable: true
});
map.layerTree.addChild(ogc3dTilesLayer);

Create a feature store for the WFS service

Program: Create a WFSFeatureStore
const featuresUrl = "https://fusionurl/ogc/wfs/building_features";
const wfsCapabilities = await WFSCapabilities.fromURL(featuresUrl);
const typeName = wfsCapabilities.featureTypes[0].name;
const featureStore = WFSFeatureStore.createFromCapabilities(wfsCapabilities, typeName, {outputFormat: "json"});