Skip To Content

Create 3D buildings

In the previous lesson, you converted lidar data into three elevation layers: one showing elevation of the ground (Digital Terrain Model), one showing elevation of features and buildings on top of the ground (Digital Surface Model), and one showing height of features above ground (normalized Digital Surface Model). In this lesson, you'll use these elevation layers and the building footprints to calculate attribute data for roof forms and heights. You'll then use those attributes to symbolize the building footprints as 3D features. Lastly, you'll check the features for potential errors.

Extract building roof forms

To extract roof forms, you'll use the Extract Roof Form tool, which is one of the two script tools included in the Roof_Form_Extraction toolbox that you downloaded with the project data. You can download this custom script as part of the Local Government 3D Basemaps solution on ArcGIS for Local Government. The Extract Roof Form tool will not automatically create 3D buildings, but it will add attribute data to 2D building footprints that describe roof form and other roof attributes. These attributes will then be used to procedurally create these features in 3D.

  1. If necessary, open your Roof Form Extraction project in ArcGIS Pro and open the Create Level of Detail 2 Buildings task.
  2. In the Tasks pane, expand the Create LOD 2 Buildings (1) task group. Double-click the Extract the roof forms of buildings task.

    Extract the roof forms of buildings task in the Tasks pane

    The task opens the Extract Roof Form tool. For the first few parameters, you'll choose the layers in your map as the input data for the tool.

  3. For Buildings, choose the Portland_Buildings building footprint layer.
  4. For DSM, choose the Portland_DSM layer. For DTM, choose the Portland_DTM layer. For nDSM, choose the Portland_nDSM layer.

    Parameters for input data

    The next three parameters define the minimum measurements for a surface to be considered a roof. The default values indicate that roofs must be at least 250 square feet if flat, 75 square feet if sloped, and 8 feet above the ground. Setting these minimum parameters prevents small, non-building objects that may have appeared in the lidar data (such as cars, signs, or street posts) from being accidentally counted as roofs. Your data mixes residential and commercial zones, so you'll accept the default values, which are neither too lenient to count non-building objects nor too strict to exclude smaller homes.


    If your own data focuses on large buildings, or if you want to include smaller buildings such as sheds or booths, you may need to change these parameters. It would also be important to change them if your data is in meters or another unit of measurement, because the unit of measurement for the values in these parameters is the same as the unit of measurement for your elevation layers.

  5. For Output Building Polygons, confirm that the output location is the City_Data geodatabase, and change the output name to Portland_Roof_Forms.

    Output Building Polygons parameter

    Lastly, you can choose to simplify the buildings. Simplifying the buildings will remove redundant or excess vertices in the building footprints. The result will make the 3D building models look smoother and reduce the time it takes to render them. You eventually want to share your 3D buildings with the Portland municipal government, so a better-looking output is desirable.

  6. Check the Simplify Buildings box.

    You'll also set the Simplify Tolerance value, the maximum distance variation between the vertices of the simplified polygon and the original polygon. A lower value will maintain accuracy, while a larger value will simplify more. You want to keep your building footprints accurate, because they are going to be used for analysis by the Portland municipal government, so you'll use a small value of 0.1.

  7. For Simplify Tolerance, type 0.1 and press Tab.

    Simplify Buildings and Simplify Tolerance parameters


    The value uses the same unit of measurement as your elevation layers.

  8. Click Finish.

    The tool may take several minutes to run. When it finishes, the new layer is added to the scene.

  9. In the Contents pane, turn off all layers except the Portland_Roof_Forms layer, the basemap, and the ground layer.

    Portland_Roof_Forms layer in the map

    Other than different symbology (which was added randomly), the layer looks similar to the original Portland building footprints layer. However, it has new information added to its attribute table.

  10. Right-click the Portland_Roof_Forms layer and choose Attribute Table.

    Attribute Table

    The attribute table opens. Alongside standard feature class attributes such as OBJECTID, Shape, Shape_Length, and Shape_Area, there are several fields related to roof height, form, and direction.

    Fields in the attribute table

    These seven fields were created by the Extract Roof Form tool based on the elevation layers and building footprints used as the tool's input. The fields and their meanings are explained in the following list:

    • BLDGHEIGHT (Building Height)—The maximum height of the building.
    • EAVEHEIGHT (Eave Height)—The minimum height of the building. Buildings with no eave height have flat roofs.
    • ROOFFORM (Roof Form)—The shape of the roof. The roof form can be Flat, Gable, or Hip. The following image shows what each roof form looks like:

      Roof form examples

    • BuildingFID—The building's internal ID number.
    • BASEELEV (Base Elevation)—The base height of the building, usually equal to the ground elevation where the building is located.
    • ROOFDIR (Roof Direction)—The compass direction (in degrees) that the roof faces. Only Gable roof forms have values for this field.
    • RoofDirAdjust (Roof Direction Adjusted)—This field allows for adjustment of the roof direction. The default value is 0. A value of 1 will rotate the roof counter-clockwise 90 degrees, while a value of 2 will rotate it 180 degrees. This field is used for manually editing roof forms that were incorrectly extracted. For now, you don't need to worry about it.


    For more documentation on the Extract Roof Form tool and its output, see the ArcGIS for Local Government page, Roof-Form Extraction Process.

  11. Close the attribute table.

Symbolize the buildings in 3D

You've created a 2D building footprints layer with roof form information in the attributes. Next, you'll symbolize the new building footprints as a 3D layer to create 3D features with LOD 2 roof forms. To do so, you'll use one of the layer files you downloaded with the project data. Layer files include preset symbology that you can apply to existing layers.

  1. In the Tasks pane, double-click the Enable and symbolize 3D buildings task.

    Enable and symbolize 3D buildings task

    Before you can apply the layer file to the roof forms layer, you need to enable the layer for 3D. The task outlines several steps you'll need to take. The next few steps of this lesson will walk you through them.

  2. In the Contents pane, drag the Portland_Roof_Forms layer from the 2D Layers group to the 3D Layers group, above the Portland_LAS.lasd layer.

    Portland_Roof_Forms layer moved to the 3D Layers group

  3. Right-click the Portland_Roof_Forms layer and choose Properties.

    The Layer Properties window for the layer opens. You'll use this window to change the base elevation of the features to an absolute height of 0. Currently, features are draped on the ground. While it seems counterintuitive to place the features anywhere but the ground, the features have BASEELEV data in their attributes. The layer file you'll apply to the features will use the BASEELEV attributes to determine the correct height where the features should be. If you kept the features on the ground, they would be symbolized at the height of the ground plus the BASEELEV. The result would cause the features to float in the air.

  4. Click the Elevation tab.

    Elevation tab

  5. For Features are, choose At an absolute height. For Additional feature elevation using, click the X button to set an expression.

    Elevation properties

  6. In the Expression Builder window, confirm that the expression is set to 0.

    Expression Builder window

  7. On the Expression Builder window, click OK.
  8. On the Layer Properties window, click OK.

    The roof form features disappear from the scene. The layer hasn't been removed, but its features have been placed at an elevation of 0, which is below the elevation of the ground. Next, you'll apply the layer file to the Portland_Roof_Forms layer.

  9. In the Tasks pane, click Next Step.

    The task opens the Apply Symbology From Layer tool. This tool allows you to apply the symbology from a layer file to an input layer.

  10. For Input Layer, choose Portland_Roof_Forms.
  11. For Symbology Layer, click the Browse button. In the Symbology Layer window, browse to the Layer_Files folder in your project and double-click the LOD2_Buildings_(Feet).lyrx file.

    Parameters for the Apply Symbology From Layer tool


    If your data uses meters, you would choose the LOD2_Buildings_(Meters).lyrx file instead.

  12. Click Finish.

    The symbology is applied to the layer, displaying each building in 3D with LOD 2 roof forms.

  13. Navigate the scene to explore the symbolized features.

    Scene with symbolized 3D building features

    The buildings now have realistic 3D roof forms to represent more accurately the actual shapes of the buildings.

Review roof forms for errors

You've symbolized the building footprints in 3D, but they're just that: 2D features made to look 3D. For visualization purposes, the distinction is irrelevant. However, your ultimate goal is to deliver to the Portland municipal government a 3D layer that they can use for analysis, so you must convert the existing layer into a different type of 3D feature class. Before you make the conversion, however, you'll review the results of the Extract Roof Form tool to confirm that the roof forms match the original lidar data.

  1. In the Tasks pane, double-click the Review the roof forms for errors task.

    Review the roof forms for errors task

    The task has four steps. The first step opens the Confidence Measurement tool, the other script tool you downloaded as part of the project data. This tool compares the roof form buildings to the original DSM to check for discrepancies. The discrepancies are then quantified as an attribute that represents error. To keep the review process separate from your 3D data, the task opened a 2D map with an Imagery basemap that will contain the results of the tool. You won't use the map just yet, however.

  2. If necessary, at the top of the map viewer, click Scene to make it the active view.

    Scene tab for the active view

  3. For Buildings, choose Portland_Roof_Forms.
  4. For DSM, choose Portland_DSM.

    Parameters for the Confidence Measurement tool

  5. Click Run.

    2D map of the Portland_Roof_Forms_copy layer

    The 3D scene switches to the 2D map, which now contains a copy of the Portland_Roof_Forms layer. The layer looks the same as before but has new attributes in its table. The map also includes a copy of your DSM layer, which you can use to compare the results to your input data.

  6. In the Contents pane, right-click the Portland_Roof_Forms_copy layer and choose Attribute Table. If necessary, scroll to the right of the table.

    Portland_Roof_Forms_copy attribute table

    The new field is RMSE (Root-Mean-Square-Error), which is the difference between the values in the roof forms layer and the values in the DSM. A higher RMSE indicates higher error. While these values are useful, the Portland_Roof_Forms layer has 832 features, so looking at the errors for all of them would take a long time. To quickly visualize which buildings have high error, you'll symbolize the layer by RMSE.

  7. Close the attribute table and return to the Tasks pane.

    The second step of the task opens the Apply Symbology From Layer tool you used to symbolize the buildings in 3D.

  8. For Input Layer, choose Portland_Roof_Forms_copy.
  9. For Symbology Layer, click the Browse button. Browse to the Layer_Files folder in your project and double-click the RMSE_Classifications.lyrx file.

    Parameters for the Apply Symbology From Layer tool

    The Symbology Fields parameter automatically populates with the field from the input layer that matches the symbology field in the symbology layer. In this case, it will symbolize based on the RMSE field.

  10. Click Run.

    Building features symbolized in the map with graduated colors

    The layer file applies a graduated colors symbology to the building features. Buildings with low error are in green, while buildings with high error are in red. The task opens its third step, in which you'll investigate the buildings with high error by comparing them to the DSM and Imagery basemap. You'll make the DSM transparent so you can compare the buildings, the nDSM, and the imagery simultaneously.

  11. In the Contents pane, click Portland_DSM_copy to select it.
  12. On the ribbon, click the Appearance tab. In the Effects group, drag the Layer Transparency slider to 50.0%.

    Layer Transparency slider set to 50.0%

  13. Zoom to the buildings with high RMSE west of the river. Compare the building features to the DSM and imagery layers.

    Three buildings with high RMSE

    Visual comparison reveals that most of the buildings with high RMSE seem to have multiple parts with different heights. For the square building shown in the previous image, a portion appears to be a parking structure, while the building itself is only about half the size of the entire footprint. The RMSE may have been caused by the building footprint not reflecting the actual extent of the building. Additionally, the footprint appears to be misaligned with the imagery. You'll fix these errors later.

  14. In the Tasks pane, click Next Step.

    The final step of the task instructs you to compare the buildings to the LAS point cloud.

  15. Drag the Map tab to the center of the view, and dock it to the right of the Scene view.
  16. On the View tab, in the Link group, click the Link Views drop-down arrow and choose Center And Scale.

    Center And Scale

    The scene zooms to the same building that you are zoomed to in the map. The Map and Scene view tabs also have a link icon now, which indicates that the views are linked in this project. When views are linked, navigating in one view will simultaneously update the extent of the other view.

    Map and Scene views side by side

  17. Click the Scene view. In the Contents pane, turn on the Portland_LAS layer.

    Portland_LAS layer in Scene view

    The square building that you observed earlier seems to be inaccurate. Only part of the building is actually at the maximum height, with the rest being much lower. Like the other errors you've seen, you'll fix this error later.

  18. In the Tasks pane, click Finish.
  19. Save the project.

In this lesson, you extracted roof forms for the Portland buildings and symbolized the roof form features in 3D. Although you created the 3D features, you noticed a few errors in some of them. Before you deliver your data to the Portland municipal government, you'll fix some of the errors. In the next lesson, you'll edit the roof form features to better reflect the data before exporting the roof forms layer to a 3D multipatch feature class that you can share with the Portland municipal government.