# Navigating the Maps: Euclidean vs. Road Network Distances in Spatial Queries
## 4 Results
### Comparison of Range Search  
The accuracy for the Euclidean distance method using range queries was calculated based on the number of POIs retrieved from both methods, with the number of results from the road network distance method serving as a benchmark. The following formula was applied to calculate the accuracy:  
\[\text{Incorrect Eu} = \text{Total Eu}-\text{Total Rd}\] \[\text{Correct Eu} = \text{Total Eu}-\text{Incorrect Eu}\] \[\text{Accuracy} = \frac{\text{Correct Eu}\times 100\%}{\text{Total Eu}}\]  
where:  
\[\text{Eu}=\text{The number of results from the Euclidean method}\] \[\text{Rd}=\text{The number of results from the road network distance}\]  
Since the Euclidean distance method distances are equal to or shorter than the road network distance method, we can subtract the total number of results from the road network distance method from the total number of results from the Euclidean distance method to determine the number of incorrect results. This approach allows us to assess the accuracy of the Euclidean distance method in retrieving spatial data through range queries compared to the benchmark provided by the road network distance method. The accuracy of the range queries was determined for each query point within a range of distances, including 1 km, 5 km, 10 km, 15 km, 20 km, and subsequent increments up to 150 km. We retrieved the sets of results for each specific distance range from the Euclidean and the road network distance method. Subsequently, we calculated the accuracy using the abovementioned formula, thereby considering the total number of results obtained from each method. These accuracy results were then utilized to generate the graph presented in Figure 19, which visually represents the accuracy of different values of k within each class for the respective range distances. The graph indicates that only two categories exhibited accuracy results for the 1 km range. The shaded region on the line graph represents the confidence interval, which primarily lies above a 50% accuracy level. Due to the limited number of cases within the 1 km range, no shading is present on the line corresponding to this range. Despite Class One having the lowest point of interest density, some cases demonstrated accuracy values comparable to the road network distance method within the 1 km range. Conversely, Class Five, which exhibited the highest point of interest density, exhibited lower accuracy than Class One across the 1 km, 5 km, 10 km, and 15 km ranges. Furthermore, the graph analysis reveals intriguing patterns regarding the relationship between range and accuracy across different classes. Notably, all classes exhibited similar trends: as the range increased, the accuracy initially decreased. However, as the range continued to increase, an interesting pattern emerged. At a certain point, the accuracy began to consistently and significantly improve for each class, thereby indicating the presence of an optimal range beyond which accuracy starts to rise despite the increasing range. The turning point at which accuracy started to improve varied across classes, with Class Five exhibiting the earliest improvement at a relatively low range, followed by Class Four at a slightly higher range, and so forth. The accuracy analysis was conducted to compare the performance of the hospital and ambulance datasets for each range and class. The accuracy difference between the two datasets was plotted, following a similar process as the one used for kNN queries, as shown in Figure 20. Interestingly, the hospital dataset exhibited higher accuracy than the ambulance dataset, despite the latter having a higher number of POIs. In Class One, for the range queries within 1 km and 5 km, there were no POIs within this range in the hospital dataset. Similarly, in Class Five, only the ambulance dataset contained data within the 1 km range. However, aside from these specific cases, the hospital dataset consistently demonstrated higher accuracy across all ranges and classes.