Access photogrammetry data and the 3D Basemaps solution
The City of Pleasanton's Appraisal Department has given you access to aerial imagery products from Nearmap and the building footprints for a subdivision at the base of Pleasanton Ridge. Once you have this data downloaded, you'll add it to an ArcGIS Pro project that is a part of the 3D Basemaps solution. Together, they will lay the foundation for creating a 3D model of this community.
Acquire Nearmap data and project file
First, you'll download and unzip the Nearmap data for Pleasanton. Then, you'll download an ArcGIS Pro project with steps to help build 3D models.
- Download the Pleasanton.zip file and extract its contents to a suitable location on your computer.
Next, you'll download the 3D Basemaps solution ArcGIS Pro project from ArcGIS Online.
- Sign in to your ArcGIS Online organizational account.
If you don't have an organizational account, see options for software access.
- Click the Apps button and from the App Launcher, choose Solutions.
- Choose the 3D Basemaps solution.
- Click Deploy now.
The solution will automatically deploy its associated items to your Contents tab in ArcGIS Online.
- Point to 3D Basemaps and click Open.
The 3D Basemaps item page appears.
- Under Solution Contents, click 3D Basemaps.
- Click the Download button.
A zipped folder named 3DBasemaps automatically downloads to your computer's default download location.
- Unzip the 3DBasemaps .zip file and extract its contents to a suitable location on your computer.
Make sure that the file path to your 3DBasemaps folder does not contain any files with spaces. It will cause an error later in the workflow.
You now have the city's Nearmap data and the necessary ArcGIS Pro project.
Add Nearmap data to the project
Now that you have the required data from the city and the solution's ArcGIS Pro project, you'll add the city's data to the 3D Basemaps solution's scene, or 3D map.
- Open the 3DBasemaps folder and open the 3Dbasemaps ArcGIS project file.
ArcGIS Pro opens and you are provided with a 3D scene of the world. You'll add the Pleasanton data to this scene.
- On the ribbon, click the Map tab. In the Layer group, click Add Data.
The Add Data window appears.
- Browse to where the Pleasanton folder was extracted. Open the Pleasanton folder and open the Pleasanton geodatabase.
You'll add the AI_Buildings, DSM, and DTM datasets to the map.
- Press the Ctrl key and select the AI_Buildings, DSM, and DTM datasets. Click OK.
The layers are added to the scene.
The AI_Buildings polygon layer represents building footprints derived from Nearmap's artificial intelligence and machine learning algorithms.
The DSM raster layer is a digital surface model. Each pixel in this raster represents the elevation of the terrain as well as above-ground features such as buildings, vegetation, towers, and other infrastructure.
The DTM raster layer is a digital terrain model. Also known as a digital elevation model (DEM), each pixel represents the elevation of the bare earth. It does not include the elevation of features on the landscape, such as trees or buildings.
The DSM and DTM rasters have a resolution of 12 inches. In other words, each pixel represents an area on the earth that is 12 inches by 12 inches. When working with rasters, it is typically a best practice to use rasters that have the same resolution.
If you are a Nearmap subscriber and want to use your own data, use the Map Browser's 3D Export tool to extract the DSM and DTM for your area of interest. Then, use the Export AI Content tool to extract the building footprints for your area of interest.
Next, you'll rename the AI_Buildings layer.
- In the Contents pane, select the AI_Buildings layer.
- Press the F2 key. Type Building Footprints and press Enter.
- On the Quick Access Toolbar, click Save.
Now, that the data has been downloaded and added to the scene, you are ready to start processing the buildings.
Generate 3D buildings
The ArcGIS Pro project that you downloaded includes a series of tasks to help guide you through the process of taking your datasets and generating 3D models from them. You'll use your three layers and these tasks to create Pleasanton's 3D buildings. First, you'll create an nDSM, which will be necessary when you want to give your buildings height and a properly shaped roof.
Create an nDSM
First, you'll create a nDSM, or normalized digital surface model, using raster functions. An nDSM is created when a DTM is subtracted from a DSM. The result is an elevation raster that represents the ground-level elevations of features, as well as their height.
- If necessary, open your 3Dbasemaps project in ArcGIS Pro.
You'll use raster functions to subtract the DTM from the DSM.
- On the ribbon, click the Imagery tab. In the Analysis group, click Raster Functions.
The Raster Functions pane appears.
- In the Raster Functions pane, expand Math, and click Minus.
The Minus tool subtracts one raster dataset from another.
- Set Raster to DSM. Set Raster2 to DTM.
Before running this function, you'll ensure that it processes with the correct pixel output type. This parameter determines the range of values that a particular raster file can store. You'll use 32 Bit Float to ensure that decimal places in your output raster are not lost.
- Click the General tab. Set Output Pixel Type to 32 Bit Float.
- Click Create new layer.
A raster is added to the map.
The default name needs to be updated; you'll do this next.
- Rename the Minus_DSM_DTM layer to nDSM.
Next, you'll change the layer's symbology to better observe the data.
- In the Contents pane, under nDSM, right-click the symbol. From the drop-down menu, check the box next to Show names.
- Choose the Elevation 1 symbology.
To help make this symbology clearer, you'll change the Stretch Type. This changes the histogram used when drawing a raster's colors on the map. Using the Histogram Equalize stretch type will better show elevation data in the scene.
- On the ribbon, click the Raster Layer tab. In the Rendering group, click the Stretch Type drop-down menu, and choose Histogram Equalize.
The nDSM layer re-renders with the new stretch type; more detail is visible in the raster.
With the nDSM created, you are ready to start working with the building footprints. You will not see the nDSM in the next section, but it will be important when you make the building footprints three dimensional.
Process building footprints
To begin working with the building footprints, you'll use the provided task steps to clip the DSM raster to each building footprint. Then, the elevation will be used to segment the roof. This means that each building footprint will be subdivided based on which way the different parts of the roof are facing.
- In the Catalog pane, expand Tasks. Double-click the How to use 3D Basemaps task.
The Tasks pane appears.
The 3D Basemaps solution includes many tasks, but for the city's project, you'll focus on the Publish buildings task group.
- Expand Publish buildings and double-click Preprocess building footprints.
The first task step that opens is Split building footprints using features. You will not be using this step. You'll skip it.
- Click Skip.
You'll use the Segment building footprints using elevation task step. Again, this will take your building footprints and give them height and break them up based on their different roof sections.
- For Building Footprints, choose Building Footprints.
- For Elevation Surface (DSM), choose DSM.
Next, you'll set the Spectral Detail for the tool. This is the level of importance given to height differences in your DSM. For example, in a downtown area with tall buildings that contain many roof facets at various heights, using a lower spectral detail will result in segments created only where there are large changes in elevation. Conversely, row housing with smaller height differences between buildings may require a higher spectral detail to fully segment. Valid values range from 1.0 to 20.0. The default value is 13.
- For Spectral Detail, ensure that the value is 13.
For this parameter, and those that follow, the default value is a good starting point. Depending on your own datasets, you may want to consider trying different values until you get your desired results.
Next, you'll set the Spatial Detail. This is the level of importance given to the proximity of features in your DSM. For example, to segment architecturally complex buildings with many smaller facets, you would want to use a higher spatial detail. To smooth over variations that do not need representation, such as air conditioning units or cars in a parking garage, you would use a lower spatial detail. Valid values range from 1.0 to 20.0. The default value is 13.
- For Spatial Detail, ensure that the value is 13.
Next, you'll set the Minimum Segment Size. This parameter controls the minimum size of a potential segment in pixels. If a potential segment is less than the threshold set, the segment will be merged with a surrounding segment.
- For Minimum Segment Size, ensure that the value is 555.
Next, you'll set the Regularization Tolerance. This is the maximum distance that segment polygons can be adjusted in the effort to regularize geometry to right angles and diagonals. With high-resolution surface rasters, it's a best practice to set a regularization tolerance that is 5 to 10 times the size of the pixels to smooth out any rigidness of the pixels while maintaining the detail of the high-resolution pixels.
- For Regularization Tolerance, in the first parameter, type 2, and ensure that the second parameter is set to Meters.
- For Output Segmented Buildings, type Footprints.
When the tool is run, _segmented will automatically be added to the end of the new dataset's name.
- Click Run.
The tool may make take several minutes to run depending on your computer's hardware.
Now that the footprints have been processed, you can use them to create 3D structures.
- Click Finish.
Create 3D buildings
Now that you have an nDSM and segmented building footprints, you're ready to make 3D models of the buildings. You'll use another task to aid this process.
Based on your input data, you'll create buildings with a level of detail 2 (LOD2). Level of detail refers to the geometric intricacy of your 3D models. There are four level of detail classifications that range from LOD0, which is less detailed, to LOD3, which is the most detailed:
- LOD0 is a flat polygon without height or segmentation characteristics.
- LOD1 is a 3D polygon containing height characteristics.
- LOD2 is a 3D polygon with roof shapes.
- LOD3 is a 3D polygon with roof shapes and details pertaining to the facade of the structure such as windows, doors, and so on.
One level of detail is not necessarily better than another, but you should always try to work with a level of detail that is appropriate for a project's need. For example, someone making a realistic street-level view of a city may want LOD3. For the City of Pleasanton's needs, LOD2 buildings are the appropriate amount of detail for assessing building height and classifying roof characteristics.
- In the Tasks pane, double-click Create buildings.
This task only has one step, which will pull on the datasets you created or obtained previously.
- Input the following parameters into the tool:
- For Buildings, choose Footprints_segmented.
- For Elevation Surface, choose DSM.
- For Ground Elevation Surface, choose DTM.
- For Normalized Elevation Surface, choose nDSM.
- For Output Building Polygons, type BuildingsLOD2.
When the tool is run, _roofform will automatically be added to the end of the new dataset's name.
- Expand RoofForm.
These tool parameters control when a roof is considered sloped or flat when each building is processed. You will use the defaults.
To learn more about how these parameters can be modified to adjust your output buildings, click the Help button to see the Extract Roof Form documentation.
- Click Run.
The tool may take several minutes to run depending on your computer's hardware.
- In the Contents pane, rename BuildingsLOD2_roofform to 3D Buildings.
- Under 2D Layers, turn off every layer.
- On the ribbon, click the Map tab. In the Layer group, click Basemaps. Choose Imagery.
By changing your camera's position in the scene, you'll see your 3D buildings, with the correctly shaped roofs.
To better observe the buildings, you'll change their symbology.
- In the Contents pane, under 3D Buildings double-click the symbol.
The Symbology 3D Buildings pane appears.
- Click the Properties tab. Click the Layers tab.
You'll give the side of the house a different color than the roof. This is done with the Display Options.
- Under Display Options, change the FacadeColor to a light brown color. Change the RoofColor to a light gray color.
- Click Apply.
The sides and roofs of the buildings change color.
Now that you have the 3D buildings, you'll explore their attributes. Information about each building, not just its shape, is needed by the city.
- In the Contents pane, right-click 3D Buildings, and choose Attribute Table.
The Attribute Table appears. The first several attributes are from the original Building Footprints layer provided by Nearmap.
- Scroll to the end of the attribute table.
A number of fields were added when the LOD2 buildings were created. These contain all of the data that the city needs.
- The BLDGHEIGHT (Building Height) is the maximum height of the building.
- The EAVEHEIGHT (Eave Height) is the minimum height of the building. Buildings with no eave height have flat roofs.
- The ROOFFORM (Roof Form) is the shape of the roof. The roof form can be Flat, Gable, or Hip.
- The BASEELEV (Base Elevation) is the base height of the building, usually equal to the ground elevation where the building is located.
- The ROOFDIR (Roof Direction) is the compass direction (in degrees) that the roof faces. Only Gable roof forms have values for this field.
- The RoofDirAdjust (Roof Direction Adjusted) is the field that allows the adjustment of the roof direction. The default value is 0. A value of 1 will rotate the roof counterclockwise 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.
- Close the attribute table.
- In the Tasks pane, click Finish.
You successfully created and symbolized a 3D representation of the buildings in Pleasanton.
Although you have 3D buildings, they're technically only a 2D polygon feature class with a 3D symbology. In the final part of this lesson, you'll make a 3D feature class. This process of converting data from 2D to 3D is known as fusing.
- In the Tasks pane, double-click Fuse Buildings.
This tool will take your 2D polygons with a 3D symbology and turn it into a multipatch feature class that is able to store your building data in 3D.
- Set the following parameters:
- For Building Layer, choose 3D Buildings.
- For Unique ObjectID, choose BuildingFID.
- For Output Building Multipatch, type PleasantonBuildings.
- Click Finish.
The tool runs.
- In the Contents pane, turn off the 3D Buildings layer.
There appears to be no change to the scene, but the new PleasantonBuildings layer is a multipatch layer in the project's geodatabase.
- In the Catalog pane, expand Databases. Expand the first 3DBasemaps geodatabase.
All of the datasets you created are here.
If any datasets are missing from the geodatabase, right-click the 3DBasemaps geodatabase and choose Refresh.
Notice the icons next to your BuildingsLOD2_roofform and PleasantonBuildings feature classes. The symbol for BuildingsLOD2_roofform represents a 2D polygon feature class, while the symbol next to PleasantonBuildings represents a 3D multipatch.
- Save your project.
In this lesson, you took a DSM, a DTM, and building footprints from Nearmap and converted them into a 3D model for the city to use for its planning and safety purposes.
You can find more tutorials in the tutorial gallery.