# A Multilevel Road Alignment Model for Spatial-Query-by-Sketch
## 4 Results and Discussion
### Road Scene Matching  
After extracting the main roads from each sketch, as shown in Table 4, matching experiments were performed between each sketch and OSM to compute the road similarities. The experiments included three steps: individual road matching, composite road matching, and road scene matching. A shapefile containing 15,242 roads of Nanjing, China, from OSM was used as a matching database. The computation time was between 58.2 s and 1803 s. Table 5 presents the matching results from this database. * Each row in Table 5 shows the main roads extracted from each sketch, the matching parameters, and the matching results from OSM. * The first column in Table 5 lists the IDs of the sketches, corresponding to those in Figure 17.
* The second column lists the main roads extracted from the sketches. In addition, the matching parameters are listed, including _MaxMN_, which represents the maximum number of roads from OSM involved in the matching of the road from one sketch with the first matching priority (\(FMP\), see Section 3.3.1), and _ThresholdCon_, which represents the threshold of the direction difference for comparing the _circulation direction_ (\(CD\), see Section 3.2.4) values. * The remaining columns show the top-ranked matching results from the database based on the main roads extracted from each sketch. The similarity between each road scene from OSM and that from each sketch is also presented. The greater the similarity, the more similar are the roads between the sketch and OSM. Formula (17) was used to align roads between the sketch map and the metric map. A value of _100_ was adopted to quantitatively compute the similarity if the similarity between two roads in Formulas (2)-(4), (6), (7), (13), (15) and (16) was _True_. In contrast, a value of \(0\) was used if the similarity \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Sketch ID** & \
\begin{tabular}{c} **Main Roads Extracted** \\ **and matching parameters** \\ \end{tabular} &
\begin{tabular}{c} **Top three matching results from the roads of Nanjing,** \\ **China, in OSM and their similarities** \\ \end{tabular} \\ \hline S4 & & & & \\ MaxMN = 50 & & & \\ ThresholdCon = 20 & 152.982 & 152.933 & 152.751 \\ \hline S5 & & & \\ MaxMN = 50 & & & \\ ThresholdCon = 16 & 201.744 & 195.268 & 195.061 \\ \hline S6 & & & \\ MaxMN = 70 & & & \\ ThresholdCon = 8 & 177.137 & 172.321 & 172.296 \\ \hline S7 & & & \\ MaxMN = 200 & 82.505 & & \\ ThresholdCon = 32 & & 82.479 & 76.577 \\ \hline S8 & & & \\ MaxMN = 10 & & & \\ ThresholdCon = 15 & 165.756 & 145.922 & 145.640 \\ \hline S9 & & & \\ MaxMN = 5 & & & \\ MaxMN = 5 & & & \\ ThresholdCon = 22 & 160.303 & 153.783 & 153.652 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: _Cont._between two roads in these formulas was _False_. The weights involved in in Formulas (5), (14) and (17) were averaged: the values of \(w_{1}\), \(w_{2}\), and \(w_{3}\) in Formula (5) were set to 0.33; the values of \(w_{4}\), \(w_{5}\), \(w_{6}\), \(w_{7}\), and \(w_{8}\) in Formula (14) were set to 0.2; and the values of \(w_{9}\), \(w_{10}\), and \(w_{11}\) in Formula (17) were set to 0.33. Furthermore, it should be noted that two different matching results are shown for S5 in Table 5, as the topological relationships of the red and green roads are varied between OSM (_disjoint_) and S5 (_touching_). The matching results of the first row for S5 corresponds to the top three results obtained without considering the topological relationship of these two roads. The matching results for the second row for S5 correspond to the top three results obtained considering the topological relationship of these two roads. Figure 18 shows the whole time cost of each sketch in roads matching. It can be found that:  
* matching of sketch S9 costs the shortest time, because the quantity of main roads extracted in sketch S9 is the least (3), and also two main sketched roads in scene S9 are curved. Note that there are only two sketched roads in sketch S7, so the time cost for matching of sketch S7 is just used for composite road matching.