007] How to Perform Accurate Viewshed Analysis with 3D Building Obstructions in Global Mapper
Learn how to incorporate 3D building data into visibility calculations for realistic urban line-of-sight mapping.
This tutorial covers the essential workflow for preparing vector building data, calculating floor-based heights using attribute math, and configuring the Viewshed tool to recognize buildings as physical obstructions on top of a terrain model.
Introduction to 3D Building Viewshed Analysis
🎥 Video Tutorial: Viewshed Analysis with 3D Buildings
For a clearer understanding, check out the video tutorial below. It walks you through the entire process—from calculating building heights using attribute data to generating an accurate Line of Sight (Viewshed) map with urban obstructions. Follow along with the video to master this advanced technique!
Video walkthrough of Viewshed Analysis with 3D Building Obstructions
To follow along, please open the Workspace we worked on in the previous session and add the following file to your layers. Simply download the file and drag it into the Global Mapper workspace.
Attachment: Cur_BD.zip (Verified and safe file for Global Mapper.)
Once the file is loaded, the building footprints will appear on the map as shown below.
Preparing Building Vector Data for Viewshed Analysis
In order to include vector data in a viewshed analysis, the vector features must possess a height value assigned to an attribute named "height".
When you download continuous digital maps or NGI maps from national geographic information portals, you can usually obtain SHP files that include the number of floors for each building.
To estimate building heights, we can multiply the floor count attribute by 3 meters per floor.
First, let's identify which attribute contains the floor count in our
Cur_BD layer. For clarity, turn off all other layers except for
the DEM (Digital Elevation Model).
Finding the Building Floor Count Attribute
Let's check the information for a specific building. Select the Digitizer Tool icon, then double-click a building on the main screen to view its attributes.
In the continuous digital topographic maps downloaded from the Korean National
Information Map service, the NMLY attribute typically represents
the floor count information.
Creating the Height Attribute for Buildings
Now that we know NMLY holds the floor count, we need to create a
new attribute called height and populate it with the value of
$NMLY \times 3$.
Go to the top menu bar and select Layer -> Calculate/Copy Attribute Value(s). As the name suggests, this menu is used for copying or performing calculations on attribute values.
After selecting the menu, a window will appear to choose the target layer.
Since we are performing the calculation on the buildings in
Cur_BD, select Cur_BD.shp and click OK.
Setting Up Building Height Calculations
The Attribute Calculation Setup window will appear. Configure it as follows:
- Attribute to Assign: Type
height - Source Attribute: Select
NMLY - Operation: Select
Multiply - Use Fixed Value: Enter
3
This configuration instructs Global Mapper to: "Create a 'height' attribute and fill it with the value of NMLY multiplied by 3."
Note: By selecting "Use Formula Calculation," you can perform even more complex operations using conditional expressions. Click OK after entering the values.
Verifying the Results
Once the calculation is complete, a confirmation window will appear.
Click "OK" and then "Close" on the Attribute Calculation Setup window. If you
double-click a building again to check its info, you will see that the
height attribute and its calculated value have been successfully
added.
Running Viewshed Analysis with 3D Building Obstructions
Now that both the DEM and the building data with height values are ready, let's perform the Viewshed Analysis.
Select the Create Viewshed tool from the icon toolbar and click near the area indicated at the bottom of the screen.
Configuring Viewshed Parameters
The Viewshed Setup window will open. Enter the following parameters:
- Layer Name: Viewshed Analysis
- Transmitter (Observer) Elevation: 1.6m above Ground
- Receiver Elevation: 0m above Ground
- View Angle: Start Angle 270 (West), Swept Angle 90 (Counter-clockwise)
- View Radius: 5km
- Sample Spacing: 10x10m
-
Obstructions from Vector Data: Check
"Use Vector Features with Heights" and ensure
Cur_BD.shpis selected.
Click OK, and the result will appear as follows.
Comparing Terrain-Only and Building-Based Viewshed Results
Currently, it might be difficult to distinguish the visible areas clearly because the building layer is still on. Let's turn off the building layer to see the results better.
Now, let's compare this with an analysis that only considers the terrain. Select the newly created Viewshed layer, right-click, and choose Edit Viewshed Parameters and Recalculate.
The Viewshed Setup window will reappear. Since we have hidden the vector layers, the "Use Vector Features with Heights" section will be empty or disabled. Just click OK to run the analysis based on terrain only.
Why Building Obstructions Matter in Viewshed Analysis
Terrain-only visibility analysis can significantly overestimate visible areas in dense urban environments. By incorporating 3D building data, planners and GIS analysts can produce more realistic visibility studies for urban planning, telecommunications, security assessments, and environmental impact analysis.
Conclusion
This is the process of conducting a Viewshed Analysis in Global Mapper that incorporates building data as obstructions. Documenting each step with screenshots takes more time than expected — I started right after lunch and two hours have already flown by!
That's all for today. I hope this workflow helps you create more realistic urban visibility analyses in Global Mapper.
- Learn previous workflow in 006] How to Create Buffer Zones in Global Mapper
- Continue learning with 008] How to Save Global Mapper Online Maps for Offline Use
Comments
Post a Comment
Feel free to leave a comment if you have any questions about Global Mapper or CityEngine. I will get back to you with a sincere response as soon as possible. (Please note that all comments are moderated and manually approved to maintain a high-quality community. Promotional or spam content will not be published.)