Volume Measurements with the VolumeCalculator

Sydney Dombowsky
Sydney Dombowsky
  • Updated

Introduction

Volume calculations in FME are carried out using the VolumeCalculator transformer. However, this transformer only operates on true three-dimensional objects (such as solids and blocks) and not psuedo-3D (or 2.5D) features, such as vector line features with a Z coordinate.

For this reason, it's common to need to use other transformers besides the VolumeCalculator, to transform the source data into a geometry type on which volume measurements can be carried out.

The source datasets used in this tutorial are an AutoCAD DWG file representing the outline of a sports stadium and a LAS (.laz) point cloud that defines buildings. 

This data, as well as the workspace for this tutorial, can be downloaded from the Files section.

 

 

 

Video

This video was recorded using FME 2016.1. The interface may be different, but the concepts are the same. 

 

Step-by-Step Instructions

In this tutorial, we will be calculating the volume of a stadium. To do so, we need to convert the building footprint into solid elements and extrude them to their true height, which we will get from the point cloud.

Here’s an overview of the process:

  • Cut the point cloud into several point clouds using the building footprints as a clip boundary
  • Calculate the median height of each new point cloud
  • Restore the building footprint geometry
  • Extrude the building footprints to 3D blocks set to the median height
  • Calculate the volume of the building blocks

 

1. Start FME Workbench and Add Source Data

Start FME Workbench, and click on New to open a blank workspace.

We will first add the building point cloud dataset. Click the Reader button in the Toolbar. In the Add Reader dialog, enter the following:

  • Format: ASPRS Lidar Data Exchange Format (LAS)
  • Dataset: /BuildingPointCloud.laz
    • Click on the ellipsis (blank document icon for macOS) and browse to the dataset

Then click OK.

Add another reader to the canvas to load the stadium footprint file:

  • Format: Autodesk AutoCAD DWG/DXF
  • Dataset: /StadiumFootprint.dwg
  • Parameters:
    • Group Entities By: Attribute Schema

 

2. Add a GeometryExtractor Transformer

Using the GeometryExtractor, we will store the geometry of the building footprint to restore after the data is clipped.

Type GeometryExtractor in the canvas and press Enter to add the transformer to your workspace.

Connect the BuildingFootprints reader feature type to the GeometryExtractor Input port. Double-click the transformer to open the parameters and ensure that Geometry Encoding is set to FME Binary.

  • Geometry Encoding: FME Binary

This will store a copy of the building footprint geometry as an attribute value in _geometry.

 

3. Add a Clipper Transformer

We want to clip the Building Point Cloud to the Building Footprints data (the stadium), which we can do by adding a Clipper transformer to the workspace.

Connect the LAZ Building Point Cloud reader feature type to the Clipper Candidate input port and the Geometry Extractor Output port to the Clipper input Clipper port.

Open the parameters dialog and set the following:

  • Multiple Clippers: Yes
  • Merge Attributes: Enabled
    • Accumulation Mode: Merge Clipper
    •  Conflict Resolution: Use Candidate

The Inside output port contains the point cloud data within the stadium polygon.

 

4. Add a PointCloudStatisticsCalculator Transformer 

We want to find the average height of each building in the point cloud, so we will use the PointCloudStatisticsCalculator transformer on the clipped data to calculate the median height.

Add the transformer to the workspace and connect the Clipper Inside output port to the PointCloudStatisticsCalculator Input port.

Open the parameters and choose Median for the z component:

  • Component: Z
  • Mean: Enabled

This transformer will provide the height of each building by calculating the median height of each building-shaped point cloud.

 

5. Add a GeometryReplacer Transformer

We can now rebuild the polygon geometry, extrude it, and calculate the volume. First, add a GeometryReplacer transformer to the canvas. Connect the PointCloudStatisticsCalculator Output port to the GeometryReplacer Input port.

Open the parameters dialog and set the following:

  • Geometry Encoding: FME Binary
  • Geometry Source: _geometry
    • Click the drop-down arrow, hover over Attribute Value, and select _geometry
    • This is the attribute we created with the GeometryExtractor in step 2!

 

6. Add a 3DForcer Transformer

We will use a 3DForcer transformer to ensure our z values are treated as 3D. 

Add the transformer and connect the GeometryReplacer Output port to the 3DForcer Input port. Open the parameters:

  • Elevation: 0

The base of the building will now have an elevation of zero set.

 

7. Add an Extruder Transformer

Now that we have a 3D feature, we will use the z values to turn the flat surface into a solid.

Add an Extruder transformer and connect the 3DForcer Output port to the Extruder Input port. Open the parameters and set the following:

  • Direction: Vertical
  • Distance: z.median
    • Use the drop-down arrow to select the z.median Attribute Value
    • This is the value calculated by the PointCloudStatisticsCalculator

 

This will create solid features with the correct elevation.

 

8. Add a VolumeCalculator Transformer

Now that we have solid 3D features with accurate elevation, we can calculate the volume of the stadium.

Add a VolumeCalculator transformer and connect the Extruder Extruded output port to the VolumeCalculator Input port.

This will calculate the volume of each feature and write it to an attribute called _volume.

 

9. Add a StatisticsCalculator Transformer

The last step is to calculate the total volume of the stadium, which can be done using a StatisticsCalculator and finding the sum of the _volume attribute. 

Add a StatisticsCalculator to the workspace and connect the VolumeCalculator Output port to the StatisticsCalculator Input port:

Open the StatisticsCalculator parameters and set the following: 

  • Attribute: _volume
    • Use the drop-down arrow to select from the list of attributes
  • Sum: Enabled

This will create a new attribute called _volume.sum containing the total volume of the stadium.

 

10. Run Workspace and View Output

Now save and run the workspace. Ensure you have selected Enable Data caching in the Run menu from the toolbar:

Once the translation completes, the Data Preview window will open and the StatisticsCalculator Summary output will be displayed automatically. This will show one record for the _volume.sum attribute, representing the total volume of the stadium:

To view the StatisticsCalculator Complete output, click the green Inspect Cached Data button next to the Complete output port. The Data Preview window will update to show the selected output:

The Table shows the median elevation from the point cloud, the volume of each building part, and the sum of the volumes to create the stadium volume. The Graphics window shows the 3D solid volume created from the point cloud and building footprints of the stadium.

Additional Resources

VolumeCalculator Transformer Documentation
GeometryExtractor Transformer Documentation
Clipper Transformer Documentation
PointCloudStatisticsCalculator Transformer Documentation
GeometryReplacer Transformer Documentation
3DForcer Transformer Documentation
Extruder Transformer Documentation
StatisticsCalculator Transformer Documentation

Data Attribution

The data used here originates from open data made available by the City of Vancouver, British Columbia. It contains information licensed under the Open Government License - Vancouver.

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.