## 2 Materials and Methods
### Neighborhood Search and Feature Extraction
#### 2.3.2 Geometric Feature Extraction of 3D Points  
Each 3D point in this study contained both geometric and textural features. The four geometric features selected for extraction were the local planarity (\(f_{p}\)), local horizontality (\(f_{e}\)), local sphericity (\(f_{s}\)), and relative elevation (\(f_{z}\)). Using these values, a 4-dimensional vector space can be constructed for each point using \(\mathrm{V}(p_{i})=\{f_{p}(p_{i}),f_{v}(p_{i}),f_{s}(p_{i}),f_{z}(p_{i})\}\), constituting the feature space of the point. The calculation of each variable is described below:  
1. Local planarity (\(f_{p}\)). Local planarity can be expressed as the flatness of the neighborhood space and is an important feature of many 3D urban objects, such as building facades, pitched roofs, and flat ground, all of which exhibit good local planarity. In the k-neighborhood space, local flatness can be calculated as the sum of the squares of the distances from all points in the neighborhood space for the optimal fitting plane of the local neighborhood. Therefore, the key is determining the neighborhood's optimal fitting plane. This problem can be solved by establishing a neighborhood covariance matrix and estimating the local surface normal vectors based on calculating eigenvectors and eigenvalues [33; 34]. Given a 3D space point \(p_{i}\), with its k-neighborhood space being N (\(p_{i}\)) and the centroid of its neighborhood space being \(\widetilde{p}\), the \(3\times 3\) covariance matrix (\(C\)) is calculated as follows: \[C=\frac{1}{k}\mathrm{\sum}_{i\in N}\left(p_{i}-\widetilde{p}\right)^{T}\left( p_{i}-\widetilde{p}\right).\] (1) Following Equation (1), \(C\) is a symmetric semi-positive definite matrix. It has three orthogonal eigenvectors, \(\mathrm{\
u}_{0}\), \(\mathrm{\
u}_{1}\), and \(\mathrm{\
u}_{2}\), which correspond with three non-negative eigenvalues, \(\mathrm{\lambda}_{0}\), \(\mathrm{\lambda}_{1}\), and \(\mathrm{\lambda}_{2}\), respectively. If \(\mathrm{\lambda}_{2}\geq\mathrm{\lambda}_{1}\geq\mathrm{\lambda}_{0}\geq 0\) is assumed, the minimum eigenvalue \(\mathrm{\lambda}_{0}\) corresponds with the eigenvector \(\mathrm{\
u}_{0}\), which approximately represents the normal vector of the optimal fitting plane in neighborhood space [35]. As such, \(\mathrm{\lambda}_{0}\) represents the deviation from the local plane along the surface normal vector \(\mathrm{\
u}_{0}\). Therefore, we can define the flatness metric at \(p_{i}\) according to Equation (2) [36]: \[f_{p}(p_{i})=1-\frac{3\mathrm{\lambda}_{0}}{\mathrm{\lambda}_{0}+\mathrm{ \lambda}_{1}+\mathrm{\lambda}_{2}};\] (2)
2. Local horizontality (\(f_{v}\)). Horizontal features are more evident on flat roofs and urban roads. Horizontality can be measured (Equation (3)) using the normal vector Pi's  
Figure 3: The solution diagram of the shortest distance between three-dimensional lattice points is based on the Dijkstra algorithm. absolute value and the vertical \(z\)-axis's cosine. A cosine value close to zero indicates high horizontality, whereas a value close to 1 indicates a vertical plane. \[f_{v}(p_{i})=|v_{0}.n_{z}|\text{, }n_{z}=<0,0.1>;\] (3). 3. Local sphericity (\(f_{s}\)). Sphericity determines whether geometric shapes within a local area resemble a ball shape, typical for tree crowns. As previously defined, spherical properties can be calculated based on the difference between three characteristic values: \(\lambda_{2}\geq\lambda_{1}\geq\lambda_{0}\geq 0\). The larger the value obtained with the following equation, the better the spherical properties: \[f_{s}(p_{i})=\frac{\lambda_{0}}{\lambda_{2}};\] (4). 4. Relative elevation (\(f_{s}\)). Different ground object types are linked to certain height classifications in urban environments. Owing to topographic fluctuations, absolute elevation information lacks a unified differential expression.