Crowd-Sourced Vs Proprietary Routing Web Apis a Web GIS App for Comparing Routing Web Apis Over Proprietary and Crowd - Sourced Road Network Data
Total Page:16
File Type:pdf, Size:1020Kb
National Technical University of Athens Crowd-sourced vs proprietary routing web APIs A Web GIS app for comparing routing web APIs over proprietary and crowd - sourced road network data By Dimitris Leader A thesis submitted in partial fulfilment of the requirements for the degree of Master of Science (M.Sc.) in Geoinformatics National Technical University of Athens School of Rural and Surveying Engineering Athens, February 2020 Supervised by Vasileios Veskoukis Table of Contents Table of Contents Table of Contents .......................................................................................................................... i Acronym List ................................................................................................................................ iii List of Figures .............................................................................................................................. iv List of Tables ................................................................................................................................. v List of Equations .......................................................................................................................... vi List of Graphs............................................................................................................................... vi Abstract ....................................................................................................................................... 1 Ελληνική Περίληψη – Greek Summary ....................................................................................... 4 1. Introduction ........................................................................................................................ 7 2. Study area, tools, and methodologies .............................................................................. 12 2.1 Municipalities of choice ............................................................................................ 12 2.1.1 Dionysos ............................................................................................................ 14 2.1.2 Ekali ................................................................................................................... 16 2.1.3 Kifisia ................................................................................................................. 18 2.1.4 Nea Erythrea ...................................................................................................... 20 2.2 Data sources .............................................................................................................. 23 2.2.1 Polygons of areas of interest ............................................................................. 23 2.2.2 Road network data ............................................................................................ 24 2.3 Technology options and choices ............................................................................... 30 2.3.1 Route acquisition and data handling................................................................. 31 2.3.2 Viewing tool....................................................................................................... 32 2.4 Hausdorff Distance .................................................................................................... 33 3. Point determination .......................................................................................................... 36 3.1 Point generation process .......................................................................................... 36 3.1.1 The initial collection of points ........................................................................... 37 3.1.2 k-Means clustering ............................................................................................ 40 Page i Table of Contents 3.1.3 Averaging ........................................................................................................... 43 3.1.4 Road snapping ................................................................................................... 46 3.1.5 Nearest points distribution tables ..................................................................... 47 3.2 Forming a final set of incidents ................................................................................. 49 4. Route creation and response manipulation ...................................................................... 52 4.1 OSRM Routes API ...................................................................................................... 52 4.2 Google Directions API ................................................................................................ 55 4.3 Task flow.................................................................................................................... 61 5. Online Viewing Tool .......................................................................................................... 68 6. Conclusions and future suggestions .................................................................................. 74 Bibliography .............................................................................................................................. 80 Appendix A ................................................................................................................................ 83 Page ii Acronym List Acronym List ACRONYM MEANING API Application Programming Interface AOI Area of interest1 CRS Coordinate Reference System dH Hausdorff Distance ELSTAT Hellenic Statistical Authority GIS Geographical Information System IDE Integrated Development Environment JSON JavaScript Object Notation OS Operating System OSM OpenStreetMap platform OSRM Open-source Routing Machine QGIS-LTR QGIS Long Term Release (most stable release) VGI Volunteered Geographic Information 1 The term “area of interest” is used interchangeably and in cases refers to all four municipalities studied while in others refers to one specific municipality. The meaning depends on the context it is used in. Page iii List of Figures List of Figures Figure 1: The 3 main phases of development. ............................................................................ 9 Figure 2: Graph displaying the exponential number of routes per extra point ........................ 10 Figure 3: Map of the four municipality units and the road network each contains ................. 13 Figure 4: Map of Dionysos road network .................................................................................. 16 Figure 5: Map of Ekali road network ......................................................................................... 17 Figure 6: Map of Kifisia road network ....................................................................................... 20 Figure 7: Map of Nea Erythrea road network ........................................................................... 22 Figure 8: General steps to implementation .............................................................................. 23 Figure 9: Polygonal representation of the areas of interest used in the study ........................ 23 Figure 10: A "way" element declared in an osm file ................................................................. 25 Figure 11: A "node" element declared in an osm file ............................................................... 25 Figure 12: A "highway" tag declared in an osm file .................................................................. 26 Figure 13: Python logo .............................................................................................................. 31 Figure 14: List of popularity of programming languages according to 2019 Stack Overflow ... 31 Figure 15: PyCharm IDE logo ..................................................................................................... 32 Figure 16: Leaflet logo ............................................................................................................... 32 Figure 17: WebStorm IDE logo .................................................................................................. 33 Figure 18 After the calculation we declare that any point of A is at most distance h from any point of B. [12] .......................................................................................................................... 35 Figure 19: Flow chart for the creation of the semi-stochastic location set .............................. 37 Figure 20: The blue points would be left out if the topological process did not take place prior to the initial point creation ....................................................................................................... 38 Figure 21: Dionysos map of points and data ............................................................................. 39 Figure 22: Ekali map of points and data .................................................................................... 39 Figure 23: Kifisia map of points and data .................................................................................. 40 Figure 24: Nea Erythrea map of points and data ...................................................................... 40 Figure 25: Demonstration of the standard algorithm ............................................................... 41 Figure 26: Nea Erythrea sample clustering and number of points per cluster for 5 clusters (k = 5) ..............................................................................................................................................