1. Introduction
According to building design codes [
1], the height of buildings is defined as the vertical distance from the designated outdoor ground level to the top of the structure, which may not correspond to the building’s highest point. Building height characterizes the vertical dimension of the urban form [
2,
3], which is vitally essential for digital city development and urban environment impact (energy use [
4,
5], urban climate studies [
6], greenhouse gas emissions [
7,
8], the heat island effect [
9,
10], solar radiation [
11], etc.) and human well-being [
12]. Additionally, it is a key parameter for constructing digital line graphic (DLG) datasets [
13].
Traditional methods for measuring building heights primarily rely on instruments like total stations and leveling devices. Although these methods can provide accurate height data, there are flaws; for example, they are only for single buildings, are unable to cover large areas, and measuring is time-consuming and inefficient. Currently, the methods of the acquisition building heights mainly include remote sensing images [
14], synthetic aperture radar (SAR) [
15], a digital surface model (DSM) [
16], or a combination of various data sources. These methods do not require direct contact with the building [
17,
18], which can rapidly acquire height information, but lower accuracy. For instance, information on building height in large [
19,
20] and complex terrains can be obtained from remote sensing images. In contrast, data accuracy and image resolution are lacking, making it challenging to identify small or complex structures [
3]. In contrast, Light Detection and Ranging (LiDAR) [
21] point clouds can provide more accurate vertical data than large-scale remote sensing images or small-scale inclined photogrammetry. The fine details of building surfaces and high-precision 3D information for various building types over large areas can quickly be obtained. Consequently, point clouds are widely applied in urban building information extraction and 3D reconstruction [
22,
23,
24], significantly enhancing accuracy and reliability [
25,
26].
The use of point cloud for accurate extraction building information has become widespread. Many studies have explored roof information extraction. In the research of Fulya Gonultas et al. [
27], the RANSAC algorithm was utilized to extract roof surfaces. However, irregularly shaped roofs were not effectively detected, and tree or ground points interfered with roof plane detection. To address these issues, Shao Jie et al. [
28] proposed a method using fabric simulation for top-down seed point detection and region growth segmentation, which minimized the influence of ground points and reduced over-segmentation, whereas the scene with significant height differences between adjacent roofs is lack of efficiency. Additionally, low roofs are hard to detect, and flat canopy vegetation may be misclassified as roofs. And then, Tarsha Kurdi et al. [
29] proposed a method that roof point clouds were automatically extracted by analyzing the Z-histogram and applying building point cloud filtering, which resolved the issue of tall trees interfering with roof detection and accurately classified point clouds. However, these studies have only focused on roof extraction and segmentation. In building heights research using LiDAR, roof information was often not extracted. However, building heights were directly acquired according to LiDAR characteristics. S. Shirowzhan et al. [
30] developed a spatial data mining method to cluster high and low building points from point cloud data using a custom information system to determine height information. Feng Cheng et al. [
31] used GLAS waveform peaks from ICESat data to extract the relative heights of ground targets and subsequently analyzed building height trends in Beijing. As the successor to ICESat, ICESat-2 features a more advanced terrain laser height measurement system. Lao et al. [
32] proposed a method to evaluate building heights using the RANSAC algorithm and statistical analysis of ICESat-2 LiDAR data. However, uncertainties arise when intersecting areas are classified between buildings and vegetation canopies, resulting in inaccuracies in building height estimation. Furthermore, many scholars have combined LiDAR point clouds with other data to estimate building heights. For example, Xiao Ma et al. [
33] fused aerial optical and radar data and applied the random forest algorithm to derive building heights. Nonetheless, the feature selection process is complex and high-rise structures are underrepresented in the training data. Wan-Ben Wu et al. [
34] proposed combining radar, optical, and nighttime light images with a random forest model to estimate building heights in China at a 10 m resolution. While these studies have integrated various data sources to estimate building heights, limitations remain in complex environments. The data processing workflow is complex, and calculation accuracy requires further improvement. Moreover, these methods define building height as the height of the building’s highest point, which deviates from the official building height calculation standards.
The previous study enhanced methods for large-scale building extraction and height estimation, but it used the highest point of the roof as the building’s height [
35]. According to building codes, the highest point of the roof does not represent the actual height for specific building types, which have varied height calculation methods. With its high precision, point cloud data can capture fine details of the roof surface, distinguish roofs from trees and other obstructions, and segment the roof surfaces, making it ideal for precise building height calculations. To address uncertainty, accuracy, complexity, and limitations in building height estimation, this paper uses point cloud data with varying resolutions in complex environments and develops a building height calculation model based on roof surfaces and building parameters, enabling accurate height calculation across large areas.
2. Methods and Data
To address the challenges of building height extraction in large areas, such as low roof extraction accuracy due to occlusions and building type uncertainties, this paper combines building design specifications to accurately obtain the heights of various building types from point cloud data over a wide area. Data preprocessing was conducted prior to the experiments. CloudCompare v2.10 software was used for fabric simulation filtering, removing the ground point cloud while retaining the non-ground point cloud. The processed data were then applied in the subsequent experiments. The main steps of the algorithm proposed in this paper are shown below.
- (1)
First, the building roof point cloud is extracted, using a framework of coupled normal vector density clustering and region growing algorithms;
- (2)
Second, the roof point cloud is segmented and classified using a Gaussian mixture model with variational Bayes for surface segmentation and roof slope features for classification;
- (3)
Finally, a high-precision model is constructed based on the roof classification to obtain the heights of various building types. The calculation workflow of building heights is illustrated in
Figure 1.
2.1. Data Sources and Processing
To assess the feasibility of the proposed method, two experiments were conducted using the ISPRS baseline dataset and the STPLS3D dataset [
36], which includes areas with various roof shapes. The ISPRS dataset provides an airborne point cloud encompassing a wide range of architectural scenarios. The STPLS3D dataset is a large-scale aerial photogrammetry dataset, containing point clouds of buildings with diverse types and styles. These two public datasets are frequently employed in research, providing highly valuable and informative test results.
The experimental area selected from the German Vaihingen dataset, provided by the ISPRSII/4 working group, is shown in
Figure 2a. This area includes densely populated stand-alone and small multi-story buildings with various roof types and complex structures, representing diverse architectural styles. Furthermore, the Vaihingen dataset offers high-resolution aerial imagery and accurate geographic coordinates, making it ideal for tasks like building inspection, classification, segmentation, and 3D reconstruction. The STPLS3D dataset was also selected for this study. The Indianapolis_points_GTv1 data from the STPLS3D dataset are used in this study. The experimental area, shown in
Figure 2b, is based on both simulated and real geographic environments, including actual urban areas and simulated topography and built environments. This offers a diverse and accurately labeled 3D point cloud dataset. The main objects in this area include buildings, trees, and terrain, with roofs of varying styles, primarily sloped, and complex structural forms. These features facilitate data processing in more intricate scenarios.
Both experimental areas contain buildings with flat roofs (
Figure 3a), sloped roofs (
Figure 3b), and composite roofs (
Figure 3c). These roofs represent common modern styles and provide a broad sample of typical roof types. Building codes require different height calculations for various building types. Therefore, the roof surface is extracted and segmented, providing the foundation for accurately calculating building heights.
2.2. Building Roof Extraction Based on Normal Vector Density Clustering and Region Growing (NVD-CRG)
The roof surface consists of multiple planar sections, with the normal vectors of the roof point cloud aligned in distinct directions, showing a regular pattern. In contrast, the normal vectors of tree vegetation point clouds are distributed randomly and lack directional consistency. Therefore, this paper employs the Normal Vector Density Clustering and Region Growing (NVD-CRG) algorithm [
37,
38] to extract the roof point cloud and eliminate the tree point cloud after preprocessing. The main steps of the normal vector density clustering process are illustrated in
Figure 4.
- (1)
Input non-ground point cloud and initialize the neighborhood radius (Eps), minimum point threshold (), and dot product threshold (c);
- (2)
Search for the number of points (n) within Eps and check if the threshold is met. If so, label the point as a core point; otherwise, label it as a noise point;
- (3)
Calculate the unit normal vectors for the point and its neighbors, then compute the dot product (C). If c < C < 1, label it as a roof point cloud; otherwise, label it as noise;
- (4)
Retrieve the neighboring points, repeat steps (2) and (3), and continue until all points are processed. Finally, output the roof point cloud.
The selection of parameters plays a critical role in building roof extraction. Eps and should be set according to the local density of the point cloud. A smaller value is appropriate for sparse regions, while a larger value is preferable in dense areas to accurately identify core points. Throughout the process, the critical step is determining whether a point belongs to the roof point cloud by repeatedly calculating the dot product of its normal vector and that of its neighbors.
2.3. Point Cloud Segmentation of Roof Surfaces Based on Variational Bayesian Gaussian Mixture (VB-GMM)
Based on the roof point cloud extraction, this paper employs the Variational Bayesian Gaussian Mixture model (VB-GMM) [
39,
40] to segment the roof surface, as the Variational Bayesian approach performs effectively with high-dimensional and noisy data. The Gaussian mixture model assumes that each data point is generated by one of several Gaussian distributions. Each Gaussian distribution represents a clustering center, and generating data points involves selecting a distribution (choosing a clustering center) and sampling from it. The Variational Bayesian approach approximates the posterior distribution by introducing latent variables and hyperparameters through variational inference, avoiding direct calculation of complex multidimensional integrals. The parameters of the model include the means
, covariance matrices
, and mixing coefficients
of each Gaussian distribution, as well as the variational parameters
.The model realization process is shown in
Figure 5.
During the implementation, parameter initialization is critical for effective segmentation. The mixing coefficients represent the weights of each Gaussian component. The mean determines the center of each Gaussian component. The covariance matrices describe the shape and extent of each Gaussian component. Simple initializations, like the unit matrix, may fail to capture the data’s complexity, while overly complex initializations increase computational cost and early instability. The steps to implement the whole segmentation process are as follows:
- (1)
Initialization: Randomly initialize the model parameters, including those of the GMM, such as , , , and .
- (2)
Step E: The variational parameters are updated by estimating the posterior probability
that each data point
belongs to a Gaussian component
using variational inference. This posterior estimate is then employed to adjust the variational parameters accordingly,
as the hidden variable.
- (3)
Step M: Maximize the log marginal likelihood of the complete data to update the model parameters, incorporating the updated variational parameters such as the means, covariance matrices, and mixing coefficients.
- (4)
Iterative convergence check: Determine if the algorithm has converged by alternating between the E and M steps until convergence.
- (5)
Output results: Assign Gaussian mixture components to each data point to achieve roof surface point cloud segmentation.
2.4. Height Calculation of Multi-Type Buildings Based on Roof Slope Characteristics
According to the building heights calculation process, various roof types require different methods for height calculation. Therefore, building codes are used as the primary basis for calculating building heights. First, the slope orientation characteristics of each roof are calculated to achieve the building classification. Second, the corresponding ridge and eave lines are extracted based on the roof types. Finally, the building heights for different types of structures across wide areas are calculated based on building codes.
2.4.1. Buildings Roof Classification
In this paper, roof point cloud slope characteristics are employed to classify conventional roofs. According to classification standards, flat roofs typically have slopes less than 5%, while sloped roofs generally exceed 10% [
41] and are commonly classified as single-slope, double-slope, or quadruple-slope roofs.
The slope refers to the angle between the tangent plane at a point on the surface and the horizontal plane. It is commonly expressed as a degree or a percentage of slope. In this paper, slopes are illustrated using degrees as an example. Slope direction refers to the steepest downslope direction at a given location on the surface. Slope direction can be visualized as the compass direction of the terrain, measured in degrees clockwise, ranging from 0° (due north) to 360° (also due north). Flat slopes have no direction, with their value designated as −1.
Traditional roof slope calculations require accurate measurements of roof height and span length. However, due to the disordered nature of point cloud data, errors often arise in slope estimation. To address this problem, the PCA algorithm is employed to fit the segmented roof point cloud into a plane, after which the slope and slope direction are calculated. The slope direction is defined as the angle between the projection of the plane’s normal vector and the horizontal plane. It is measured as the angle between the slope surface’s normal and the positive
x-axis, typically using the north as a reference and measured clockwise, as shown in
Figure 6. Slope represents the slope, and aspect represents its direction, illustrated in
Figure 7. The formula for calculating slope is as follows:
where
represents the normal vector of the fitted plane, with A, B, and C corresponding to its components along the x, y, and z axes, respectively. Meanwhile,
denotes the normal vector of the horizontal plane. The slope direction is calculated using the following formula:
2.4.2. Ridge and Eave Line Extraction
For flat-roofed buildings, the eaves form the roof’s boundary. For buildings with sloped roofs, the eave line is the boundary line of the roof, and the ridge line is the intersection at the roof’s top between opposite slopes or sides. The ridge and eave lines can be determined by extracting the boundary point cloud from the segmented roof shapes.
The alpha-shapes [
42,
43] contour extraction algorithm, known for its robustness and ease of implementation, is chosen to extract the roof’s boundary line. In practice, the point cloud is initially projected onto a two-dimensional (2D) plane, commonly the XOY plane, with all z-coordinates set to a constant, such as z = 0, to extract the boundary’s 2D data. The extracted boundary points are then matched with the original 3D point cloud. Once the boundary line is obtained, it is segmented [
44]. The ridge line consists of points with the largest mean z-value, while the eave line is formed by points with the smallest mean z-value.
2.4.3. Principles of Building Height Calculation
The building height and the ground elevation of the outdoor design are clearly specified in the Uniform Standard for Civil Building Design (GB50016-2014) [
45]. The outdoor design ground is calculated based on two criteria: the elevation at the main safety exits of the building’s first floor and the elevation that meets firefighting operation requirements, with the lower value chosen as the outdoor design ground elevation. The lower elevation is chosen as the outdoor design ground elevation. Since the point cloud data in this study do not account for firefighting requirements, the DEM (Digital Elevation Model) of the outdoor ground is used as the building’s outdoor design ground elevation.
According to this code, buildings are classified into flat, sloped, and multi-type combined roofs, as illustrated in
Figure 8. The brown line represents the outdoor ground, and the grey line shows the roof, including the ridge and eaves. The method for calculating building height is explicitly outlined in
Section 3.2 of the Uniform Standard for Civil Building Design (GB50016-2014) and is specified as follows:
- (1)
The height of flat-roofed buildings is measured from the outdoor design floor to the top of the daughter wall. For buildings without a daughter wall, the height is calculated from the outdoor design floor to the apex of the eaves. Let the elevation of the outdoor design floor be
and the elevation of the eaves be
. The calculation formula is:
- (2)
For sloped roof buildings, the heights of the eaves and the ridge should be calculated separately. The eave height is measured from the outdoor design floor to the eaves or the lowest point of the sloped roof, and the ridge height is measured from the outdoor design floor to the ridge. The overall building height is calculated as the average of the eave and ridge heights. The outdoor design floor elevation is recorded as
, the eave height as
, and the ridge height as
. The calculation formula is:
- (3)
For buildings with multiple roof types, each roof form should be calculated separately, and the maximum height taken. Skylights on the roof can be excluded from the overall building height.
3. Results
To measure the performance of the proposed method, experimental validation was conducted using two datasets described in
Section 2.1: the Vaihingen point cloud data from ISPRS and the Indianapolis_points_GTv1 dataset from STPLS3D. The former represents real data from a German region, while the latter is a simulation of an urban environment. These datasets differ in point cloud resolution, point spacing, and topographic and surrounding conditions.
3.1. Building Roof Extraction
To enhance roof extraction performance, two building roof extraction experiments were conducted on the experimental areas from the two datasets (shown in the first column of
Figure 9). The neighborhood radius
Eps, minimum point threshold
, and dot product threshold
were configured for extraction. In this study,
Eps is set to 4,
to 60, and
to 0.9. The roof extraction results for the entire experimental area are shown in the second column of
Figure 9. Additionally, three smaller areas, labeled Area 1, Area 2, and Area 3, were selected from each dataset’s experimental area. These regions, marked by wireframes in the roof extraction results shown in
Figure 9, were chosen for detailed analysis.
As shown in
Figure 9, the method demonstrates strong overall performance in extracting roofs across large areas, with more complete extraction for individual roofs. It effectively captures most planar surfaces in the scene. Roofs with larger planar areas and more points are extracted more accurately. Simple flat and sloped roofs are captured precisely, even complex roofs show good performance. This result highlights the method’s effectiveness in handling diverse roof structures and processing complex point cloud data. In the Vaihingen dataset, extraction results were affected by varying levels of tree shading. Area 1 is impacted by surrounding trees, leading to missing and incomplete roof extractions. In contrast, Area 2 shows the best results due to fewer obstructions and larger, flatter roof surfaces. The accurate extraction of roof types in Area 3, despite the complexity and variation in its roof structures, further underscores the method’s adaptability in processing diverse architectural forms. Despite the method’s overall strong performance, roofs obscured by trees remain partially extracted due to missing point cloud data. In the STPLS3D dataset, the buildings are evenly distributed, trees are sparse, and the roof types are diverse, with many having complex structures. Although fewer non-ground points are removed by fabric simulation filtering, roof extraction remains relatively complete. In Area 1, the scarcity of trees and shading around the building, combined with a relatively flat roof surface, leads to a more complete extraction. In Area 2, the roofs are predominantly complex, with smaller areas and multiple planes. Despite this, the extraction is more effective due to reduced shading. In Area 3, the lack of shading, along with the larger and simpler roof structure, results in the best extraction performance.
While the extraction method presented in this paper generally performs well, it faces challenges in scenarios involving tree occlusions or significant height variations. In particular, when point cloud density is low or contains noise, the extraction completeness may be reduced. Overall, the method shows strong performance, especially in extracting large and simple building types, but there remains potential for optimization in more complex scenes.
3.2. Roof Surface Division
In order to achieve accurate segmentation of the roof surface, we adopt the VB-GMM method. This approach allows the model parameters to be adjusted for various segmentation outcomes and enhanced interpretability. In the experiment, the initial mixing coefficient
of the GMM is set to be uniformly distributed, meaning each component initially has equal probability. The coefficients automatically adjust during model training. The covariance matrix
is set as a multiple of the identity matrix, and the variational parameter is uniformly distributed, the GMM parameters are updated during variational inference. Roof segmentation is performed on the three experimental areas in both datasets, with the results shown in
Figure 10. Different colors represent the point clouds of distinct roof surfaces.
The segmentation results for the selected areas in the Vaihingen data, as shown in
Figure 10, are generally good. Various roof types are segmented accurately, including complex combined roofs. In Area 1, the roof types are primarily flat and sloped roofs, and the overall segmentation accuracy is better with precise boundary delineation for each plane. The roof types in Area 2 typically consist of fewer planes. The segmented surfaces are clear and complete, with strong differentiation between individual planes. Area 3 contains more complex and diverse roof types. Some edge point clouds were misclassified, resulting in slightly lower segmentation performance than in Areas 1 and 2. The three areas of complex roofs (I, II, III) in
Figure 10 consist of both sloped and flat roofs, segmented into eight, six, and seven planes, respectively. The segmentation results are ideal. The edge point clouds between planes are well categorized, and the planar structure is clearly differentiated, ensuring accurate segmentation while preserving the integrity of the roof structure. The results demonstrate that the method achieves high accuracy and stability when segmenting roof surfaces with complex structures.
In the STPLS3D dataset’s Indianapolis_points_GTv1 data, the segmentation results are better for regions with dense building distribution and complex roof structures. The segmentation of roofs with fewer surfaces is mostly complete, while roofs with more surfaces also show satisfactory results. The roofs in Area 1 are predominantly sloped, with numerous surfaces, making it difficult to accurately categorize the boundary point clouds between these surfaces. Although the roof structures in Area 2 are complex, their regularity allows for relatively accurate segmentation of each surface. Despite the increased complexity of roofs in Area 3, the overall segmentation performance is better. The segmentation of complex roofs (IV, V, VI), as marked by the black wireframe, which has up to 10 roof surfaces, is well executed, with each roof surface accurately categorized, ensuring the completeness of the planes. For roofs with many features and subtle differences, boundary segmentation at the intersections is less effective, and some edge point clouds are not accurately categorized.
Overall, the segmentation performance of this method across both datasets is highly satisfactory, particularly for large and flat roofs, where the results are outstanding. Even when handling roofs with complex structures, the overall performance remains excellent, although some boundary processing still requires optimization.
3.3. Building Height Calculation
In this experiment, the building height is calculated based on roof extraction and roof segmentation. The calculation focuses on determining the roof type and extracting ridge and eave lines. A slope threshold of 10% is used for roof classification: slopes below 10% are classified as Type I (flat roofs), slopes above 10% as Type II (sloped roofs), and buildings with both as Type III (combined roofs). For Type I (flat roofs) and Type II (sloped roofs), ridge and eave lines are extracted for sloped roofs, and only eave lines for flat roofs. The height of each section is calculated accordingly. For Type III combined roofs, the height of each section is calculated, with the maximum height taken as the final building height.
After segmentation, roof classification is performed for both datasets. The results are shown in the second row of
Figure 11, where blue represents Type I (flat roof), red represents Type II (sloped roof), and green represents Type III (combined roof). The building height results for each experimental area are shown in the third row of
Figure 10, rounded to two decimal places in meters. Yellow numbers indicate buildings taller than 9 m, while black numbers indicate buildings shorter than 9 m. The blue roof color gradient, ranging from light to dark, represents the gradual increase in building height from low to high. The results highlight representative areas.
As shown in
Figure 11, all three regions in the Vaihingen dataset feature various roof types, with fewer Type III combined roofs and a higher proportion of flat and sloped roofs overall. The calculated building heights show relatively small variations in the Vaihingen experimental area, with an overall even distribution. The minimum heights in the three regions are 4.22 m, 4.37 m, and 2.30 m, while the maximum heights are 12.65 m, 7.30 m, and 10.41 m, respectively. This suggests that in the Vaihingen experimental area, the building heights are relatively low, with minimal variation. The height differences are minor, reflecting a relatively uniform building structure across the region. In contrast, the experimental results for the STPLS3D dataset reveal distinct characteristics. Areas 1 and 3 consist of only Type I (flat roofs) and Type II (sloped roofs), with sloped roofs being more complex. No Type III combined roofs are present. The minimum building heights in the three regions of the STPLS3D dataset are 3.08 m, 5.08 m, and 3.35 m, while the maximum heights are 32.99 m, 32.84 m, and 24.33 m, showing a large height variation. Compared to the Vaihingen data, the STPLS3D region exhibits more pronounced variations in building height. This indicates that the STPLS3D dataset features a broader range of building types, likely including high-rise structures or buildings serving different functions.
In summary, the experimental results demonstrate the strong adaptability of this method for extracting various roof types and building heights. The Vaihingen data reveal relatively low and consistent building heights, while the STPLS3D data show highly varied building heights. Moreover, the method performs well in extracting roofs with complex structures, highlighting its effectiveness in handling complex scenarios.
3.4. Precision Evaluation
To assess the applicability and accuracy of the proposed method in this paper, a comparison between the automatic calculation and manual measurement results is conducted. The error between the two was analyzed using the method outlined in the literature [
34]. We calculate
R,
RMSE, and
MAE to evaluate the accuracy of building height calculations. The accuracy of the proposed method is evaluated using a least squares regression model. The formulas for calculating
R,
RMSE, and
MAE are as follows:
where
is the number of data samples,
represents the building heights calculated in this paper,
represents the building heights measured manually, and
is the mean value of the heights calculated in this paper.
The difference between the manual measurements and the calculated results from this paper is recorded as an error. The building height error for the three areas in the Vaihingen and STPLS3D regions is shown in
Figure 12 and
Figure 13, respectively. The roof colors, from light to dark, represent the error range, with lighter colors indicating smaller errors and darker colors indicating larger errors in the height calculations.
The results show that the proposed method has high accuracy with relatively small errors. In the Vaihingen region, the maximum errors for the three experimental areas are 1.92 cm, 1.72 cm, and 1.80 cm, while the minimum errors are 0.65 cm, 0.64 cm, and 0.44 cm, respectively. For the STPLS3D region, the maximum errors are 1.79 cm, 1.45 cm, and 1.01 cm, while the minimum errors are 0.11 cm, 0.11 cm, and 0.10 cm, respectively. Overall, the errors in the building height calculations across both datasets are small (less than 2 cm), demonstrating the reliability and applicability of the proposed method. The error in the STPLS3D dataset is smaller compared to the Vaihingen dataset, mainly due to the higher density of point cloud in STPLS3D. The closer spacing of points in STPLS3D results in higher accuracy in its experimental outcomes compared to Vaihingen.
The R, RMSE, and MAE between the manually measured and automatically calculated building heights are computed using the least squares regression model for both datasets. The results of regions and roof types are shown in
Table 1 and
Table 2, respectively. As shown in
Table 1, the number of buildings in the three areas of the Vaihingen dataset varies slightly. However, the R values for all areas are close to 1, indicating a strong correlation between the automatically calculated building heights and actual measurements, with an overall error of less than 2 cm. Among the three areas, Area 1 shows the largest maximum error, RMSE, and MAE, with an RMSE of 1.18 cm, indicating a relatively large height calculation error in this area. Nevertheless, the RMSE and MAE remain within acceptable limits, indicating that the overall building height calculation accuracy in the Vaihingen area is high. In the STPLS3D dataset, the buildings are uniformly distributed, and the R values are approximately 1, indicating high accuracy in height calculations. The RMSE values are 0.82 cm, 0.70 cm, and 0.76 cm, and the MAE values are 0.57 cm, 0.49 cm, and 0.68 cm, respectively. Area 1 exhibits the largest difference between maximum and minimum errors, resulting in the highest RMSE. Conversely, Area 2 has the highest computational accuracy, with the smallest RMSE and MAE.
The calculation results, categorized by roof type, and the corresponding error and accuracy evaluations are presented in
Table 2. From
Table 2, the number of roofs across the three types in the Vaihingen data varies significantly, with Type III containing only five samples. However, Type III exhibits the smallest RMSE and MAE, suggesting that the computational method offers stability and accuracy when handling complex roof structures. The RMSE and MAE for Type I and Type II are slightly higher, but remain within a narrow range, with the maximum error not exceeding 2 cm, validating the method’s reliability across different roof types. In the STPLS3D dataset, the maximum and minimum errors for different roof types vary significantly, especially for Type II, which has a maximum error of 1.79 cm and a minimum error of 0.11 cm, reflecting notable height variations. Nevertheless, the RMSE and MAE remain low, particularly for Type III, with an RMSE of 0.61 cm and an MAE of 0.60 cm, demonstrating the method’s adaptability in this dataset.
In summary, the automatic building height calculation method proposed in this paper demonstrates high accuracy, both when assessing building heights by region and by roof type. In both regions with significant building height variations and roof types of varying complexity, calculation errors remain within 2 cm, and R values are close to 1. The observation demonstrates that the calculated building heights are close to the measured values, confirming the applicability and reliability of the proposed method.
4. Conclusions
We discuss an automatic and accurate calculation method for building heights over a wide area using point cloud. The normal vector features are used to extract the roof point cloud, segment the roof surface, and a building height calculation model is established based on the slope and orientation of the roof surface. The surrounding tree point cloud is effectively removed according to normal vector features. The proposed model can automatically acquire multi-type building heights over broad areas. Considering the various methods of calculating building heights across different building types in design codes, the proposed height calculation model automates the height acquisition process for multiple building types across large areas. Experimental results indicate that building height calculation errors are at the centimeter level, with all errors being less than 2 cm. The mean RMSE and MAE values in both the Vaihingen and STPLS3D datasets, calculated by experimental area and roof type, are at the centimeter level, ensuring the accuracy of the results. The results demonstrate high computational accuracy and reliability across different datasets, regions, and building types. The method also reduces errors typically caused by considering only the highest roof point as the building height. Therefore, the proposed method can provide more accurate and reliable data for urban construction and management, supporting the development of digital cities.
The method proposed in this paper enables the automatic acquisition of various building heights. However, due to the irregular and inhomogeneous characteristics of point cloud data, the computational accuracy fluctuates with changes in the original data density. Future research could optimize point cloud processing algorithms to improve applicability and accuracy in more complex environments. More field validation should be combined to verify the proposed method’s reliability further. This will offer more accurate and reliable data support for urban planning and management, while advancing the development of digital cities.