Building Footprint Extraction for 3D City Modelling using Point Cloud and Orthophoto: Case Study of Karaman/Turkiye

Tarık Emre Yorulmaz
9 min readMay 22


As a result of urban population growth and the construction of different complex structures, 3D visualization has become indispensable for spatial planning and urban management. 3D city models, also referred to as “digital twins”, are used in areas such as disaster management, telecommunications, tourism and navigation, in addition to city planning. Point cloud data obtained by photogrammetry and Lidar methods are commonly used for the preparation of the 3D city model. By using photogrammetry, the position and shape of the object can be determined precisely by using photographs taken from different angles. It is often preferred in 3D visualization studies because it is less costly than the Lidar method. In this study, we will obtain a 3D building model by using the orthophoto and point cloud data obtained by the photogrammetric method.

In the study, I used 8 cm resolution orthophoto and point cloud data showing a part of Karaman city center. I would like to thank the Ministry of Environment, Urbanization and Climate Change — General Directorate of Geographic Information Systems for the data.

1. Processing of Point Cloud Data

First, we need to process the point cloud data we have. We add the data to the project file;

Fig. 1: Point cloud data
Fig. 2: View of the data in the layer window

Points do not appear on the large-scale map;

Fig. 3: Study area

This small study area made ArcGIS Pro slow down. That’s why I decided to make the area even smaller. For this, I first drew a new polygon covering a small area that I selected. Then I generated a new point cloud data with the following tool;

Fig. 4: Extraction of point cloud data for the new study area

In addition, we need to convert our data into a LAS dataset so that we can use it in the next stages. Normally, this is done for mosaic purposes, but even if we only have one LAS file, we need to convert it to a dataset.

Fig. 5: Preparation of dataset
Fig. 6: The view of the new point cloud data on the map

When the points are shown according to their height values, they will appear as follows;

Fig. 7: Coloring points based on height values

The orthophoto clipped with the ‘Clip Raster’ tool according to the study area border will look like the following;

Fig. 8: Orthophoto image of the study area
Fig. 9: View of the data in the layer window

For building footprint extraction, the point cloud data must first be classified. Some point cloud data is pre-classified and served. To check the status of the data we have, we right-click on ‘Karaman.lasd’ and select ‘Properties’. We can see the status of our data via the “LAS Filter” menu.

Fig. 10: When we examine the ‘Classification Codes’ tab, we see that our data is not classified

For this study, it will be sufficient to extract only the ‘ground’ and ‘building’ classes. We use the ‘Classify LAS Ground’ and ‘Classify LAS Building’ tools for this.

Fig. 11: Ground classification

We repeat the same process for the building class. After the classification process, the ‘Classification Codes’ tab will appear as follows;

Fig. 12: ‘Building’ and ‘Ground’ classes prepared
Fig. 13: Display of points belonging to ‘building’ class together with orthophoto

The classification result does not look bad in general, but when we examine it in detail, we see that some areas need correction. To increase the accuracy of the result, I chose to apply height and vegetation filters, using the classified point cloud together with the orthophoto.

In order to apply the height filter, we first need to generate the Digital Terrain Model and the Digital Surface Model of the study area. We use the same tool for both;

Fig. 14: Digital Terrain Model generation

Here’s what we need to pay attention to: When preparing a Digital Terrain Model (DTM), only the ‘Ground’ class should be selected in the Layer Properties -> LAS Filter -> Classification Codes section. When preparing a Digital Surface Model (DSM), both the ‘Ground’ and ‘Building’ classes must be selected.

Fig. 15: Display of Digital Terrain Model on the map
Fig. 16: Display of Digital Terrain Model in layer window
Fig. 17: Display of the Digital Surface Model on the map
Fig. 18: Display of the Digital Surface Model in the layer window

Since height above sea level is calculated on both maps, we can obtain the actual height values of the buildings by subtraction between these two maps;

Fig 19: Calculation of building heights
Fig. 20: Display of result data on map
Fig. 21: Display of result data on layer window

The resulting map is called Digital Height Model (DHM) or normalized Digital Surface Model (nDSM).

2. Building Footprint Extraction

Based on the literature, we assume that areas higher than 2 meters represent buildings. We use the ‘Raster Calculator’ tool to apply the height filter;

Fig. 22: Application of the height filter
Fig. 23: Display of result data on map
Fig. 24: Display of result data in layer window

We use the ‘Set Null’ tool to get rid of pixels that do not meet our desired condition;

Fig. 25: Pixels with value ‘0’ will be deleted
Fig. 26: Display of the result map
Fig. 27: Display of the result map on the layer window

When we examine the resulting map, we see that some trees are included in the result data because they are higher than 2 meters. We can map the vegetation index using orthophoto bands to eliminate tree pixels. There are 4 bands in the orthophoto we have: Red, Green, Blue, and Near Infrared. We can map the NDVI (Normalized Difference Vegetation Index) with the Red and Near Infrared bands.

Fig. 28: NDVI calculation
Fig. 29: NDVI map
Fig. 30: View of the result map in the layer window

In order to extract the pixels belonging to the green areas from the NDVI map, we need to determine the threshold value. We choose the value ‘0.5’ based on the literature;

Fig. 31: Extraction of the green areas
Fig. 32: Representation of green areas on the map

When we examine the resulting map, we notice that the shadows of the buildings are detected as green due to their dark colors, but when we combine the height-vegetation filters, these areas will be eliminated.

Fig. 33: Extracting vegetation pixels with the ‘Set Null’ tool

Now, when we subtract the pixels of the vegetation filter from the pixels of the height filter, we will get the pixels of the buildings;

Fig. 34: Obtaining building pixels
Fig. 35: Displaying buildings in raster format

3. Error Correction

We have completed the building footprinting process, but when we examine the result data, we notice that there are smaller errors and we want to correct them. For this, we first convert our raster data to polygon;

Fig. 36: Converting raster building layer to polygon
Fig. 37: We will apply the ‘Surface Area’ filter to get rid of the non-building polygons
Fig. 38: As a result of trial/error, we choose the value of 40 square meters

We get rid of areas smaller than 40 square meters;

Fig. 39: Deleting polygons that do not represent buildings

We’re also seeing gaps in some of our building polygons. We use the ‘Eliminate Polygon Part’ tool to get rid of these gaps;

Fig. 40: We want gaps smaller than 50 square meters to be filled
Fig. 41: Gaps in building polygons
Fig. 42: Filling the gaps

However, with the use of the tool, we see that the areas that should actually be empty can be filled. Care must be taken when choosing the threshold value.

In addition, we see that there is roughness on the edges of our building polygons because we are converting from raster format. To remove this roughness;

Fig. 43: Removal of roughness on building edges
Fig. 44: Examining the resulting polygon data

While the tool we used gave satisfactory results for some buildings, it increased the error rate for some buildings. Alternatively, we can try different parameter values and different methods.

4. 3D Visualization of the Buildings

For the 3D representation of the building polygons, we need to extract the height values of these buildings from the nDSM data. We can use the ‘Zonal Statistics’ tool for this;

Fig. 45: We select the parameters as in the figure
Fig. 46: Colored representation of buildings according to their height values
Fig. 47: View of the result map in the layer window

Buildings need to be in vector format for a 3D view, but for this we must first convert the height values of ‘Float’ type to ‘Integer’ type;

Fig. 48: Conversion of height values to Integer type
Fig. 49: Display of the new map in the layer window
Fig. 50: Conversion of the result map to vector format
Fig. 51: Height values are shown in ‘gridcode’ column in attribute table of result map
Fig. 52: We use the ‘Extrusion’ tab for the 3D representation of buildings
Fig. 53: 3D display of buildings according to their height values

In this study, we extracted building footprints using orthophoto and point cloud data and displayed them in 3D format. When we examine the results and the literature, we see that it is still not possible to achieve 100% accuracy. When we compare it with building footprint extraction using the point cloud data directly, we can say that our method is more successful, especially in extracting adjacent buildings. However, while removing the vegetation pixels with NDVI, we also accidentally deleted the solar panels on the roofs of the buildings. Alternatively, we can try different vegetation indices with RGB bands and compare the results. The resulting 3D building model can be used as input data for different studies.



Tarık Emre Yorulmaz

GIS Analyst at Turkish Ministry of Environment, Urbanization and Climate Change