# Geometric Similarity Measurement Method for Micro Scene Generalization
## 2 Methodology
### Shape Similarity
#### 2.1.4 Double Lines Shape Similarity Calculation  
The method of a constructing skeleton line can describe the shape features of a simple double line to some extent [35]. In Figure 5, the black lines are the curves to be compared and the red lines are the extracted skeleton lines. Shape recognition and element matching can be performed by comparing the geometric features between the skeleton lines.  
Figure 4: Feature point sets of curve \(P\) and curve \(Q\).  
However, this method has certain limitations, such as the four types of double-lines (Figure 6a-d) being converted into straight lines after generalization (Figure 6e). If we use the linear features of generalization or skeleton lines to calculate the geometric similarity, the calculated result will be too large, which is inconsistent with visual perception.  
The above-mentioned situations mostly occur in fine-grained line groups, such as curved sections and transition sections of a river system, multilane roads, and complex interchanges in road networks. Hence, this method is unable to describe complex shapes, and an effective shape extraction approach should consider the geometric features of both sides of double lines.  
We expanded the calculation method of the single line shape similarity that combines the Included Angle Chain and Hausdorff distance under a curvature constraint. We take Figure 7a,b as examples for the similarity calculation of a double line.  
Firstly, dividing the double line into an upper curve \(C_{\upharpoonright}\) and a lower curve \(C_{\upharpoonright}\), the curvature constraint thresholds of the curves are \(\zeta_{\upharpoonright}\) and \(\zeta_{\upharpoonright}\), respectively. Then, curves \(C_{\upharpoonright}\) and \(C_{\upharpoonright}\) are initially segmented, the segment curvature is calculated, and the feature description set of the upper curve and the lower curve is obtained. By integrating them under the same coordinate system (Figure 8a,b), the geometric similarity between curve \(A\) and curve \(B\) is calculated using Equation (7).  
\[\text{Sim}_{A(C_{\upharpoonright}),\ B(C_{\upharpoonright})}^{\text{geometric}}=1- \left|\frac{H_{M,A}\big{(}A\big{(}C_{\upharpoonright}\big{)},B\big{(}C_{ \upharpoonright}\big{)}\big{)}-H_{M,B}\big{(}A\big{(}C_{\upharpoonright} \big{)},B\big{(}C_{\upharpoonright}\big{)}\big{)}}{\text{max}\big{(}H_{M,A} \big{(}A\big{(}C_{\upharpoonright}\big{)},B\big{(}C_{\upharpoonright}\big{)} \big{)},H_{M,B}\big{(}A\big{(}C_{\upharpoonright}\big{)},B\big{(}C_{\upharpoonright }\big{)}\big{)}\right| \tag{7}\]  
where \(C_{\upharpoonright}\) represents the upper and lower curves, and \(\text{Sim}_{A(C_{\upharpoonright}),\ B(C_{\upharpoonright}\big{)}}^{\text{geometric}}\) is the similarity between \(A\) and \(B\).  
Figure 5: Shape feature extraction of constructed skeleton lines: (**a**) original data; (**b**) the first generalization; (**c**) the second generalization.  
Figure 6: Several types of double lines: (**a**) convex symmetry; (**b**) concave symmetry; (**c**) curvature difference; (**d**) misplaced; (**e**) final generalized result.  
Figure 7: Curves to be compared: (**a**) curve \(A\)’s; and (**b**) curve \(B\)’s features’ description sequence.