Introduction

Sometimes, a BIM dataset contains more elements than you’re interested in.

Typically, this happens when a CAD model wrongly contains a copy of a building element that’s located far away from the actual data. The element in question may be up to hundreds of kilometers away from the relevant model data.

You may run into this issue while handling the BIM data formats Binz, IFC, Autodesk Revit and Autodesk Navisworks.

schematic representation of a CAD model content
Figure 1. Schematic representation of a BIM dataset showing the model of a building in green and some erroneous objects in red. The bounding box of the dataset, shown in blue, spans a much larger area than the actual area of interest.

Although the relevant data is present in the dataset, the erroneous objects cause problems when you convert the geometry to an OGC 3D Tiles dataset: because the bounds of the dataset don’t match the actual area of interest, it’s impossible to automatically create a good tile structure. This impediment can result in poor data quality and unresponsive behavior of a client application that consumes the 3D Tiles. To deal with this issue, you can define an OGC Filter that filters out the unwanted elements.

If possible, it’s always better to change the source data in the original CAD application.

Defining the OGC Filter

If you can’t change the source data, you can create an XML file with an OGC filter that describes the area of interest as a BBOX element.

Setting the file name

  • The model decoders for BIM data look for a *.filter.xml file next to the dataset.

  • They accept files with:

    • The same prefix as the entry point dataset

    • The prefix directory

    • The parent folder name as prefix

For example, if your dataset is called building.ifc and is located in a directory named /projects/office, the model decoders would accept any of these files: building.filter.xml, directory.filter.xml, office.filter.xml.

Creating the file content

The file must describe an XML-encoded OGC Filter. See the OGC Filters documentation for the full reference information.

You can define an area of interest filter by using an Envelope inside a BBOX element.

Example of a filter defining an area of interest
<fes:Filter xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://www.opengis.net/fes/2.0 http://schemas.opengis.net/filter/2.0/filter.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/base/gml.xsd ">
  <fes:BBOX>
    <gml:Envelope srsName="urn:ogc:def:crs:EPSG::4979">
      <gml:lowerCorner>50.86448490 4.66901090 45.00</gml:lowerCorner>
      <gml:upperCorner>50.86519135 4.66990819 70.00</gml:upperCorner>
    </gml:Envelope>
  </fes:BBOX>
</fes:Filter>
schematic representation of a filtered CAD model content
Figure 2. Visualisation of the BBOX filter in yellow, effectively excluding the erroneous objects.

Important notes

  • If you provide a model reference defined in 3D as the srsName attribute, EPSG:4979 for instance, the filter will be applied in 3D. If the reference is a 2D reference, EPSG:4326 for instance, the height of the model elements won’t be taken into account when filtering.

  • The filter uses the interacts with logic of the requested BBOX with the bounding box of each BIM element. This means that it may retain elements near the edges of the BBOX, even if the element itself doesn’t interact with it, as illustrated in this image:

unexpected
Figure 3. Example of how a filter might retain an unexpected element: the red object doesn’t intersect the BBOX, but its bounding box does.