Network analysis are widely used in Geoprahic Information Systems. Shortest path, allocation of sources, travelling salesman etc. are grouped in this section. Shortest path analysis is most used one that helps to find a path which is shortest between nodes in a network structure (graph). The “shortest path” could have different aspects. For example shortest path for distance, time or other criterias.
In GIS applications data is most important part. In network analysis, data come to the fore. When calculating shortest path for one node to another node could be very different depending on data. For instance if your road data have no information about directions (bi-directioanl or unidirectional) than you get incorret output from analysis. And this will be dangerous in case of using it in real life (can cause traffic accident by passing wrong lane)
Today web maps (Google Maps, BingMap, OpenStreetMap, HERE, Yandex.Maps etc.) are not only used for browsing, looking around but also used for finding routes. With these services’s data which cover all around the world, you can calculate routes from one city to another even from one continent to another one. I have developed Open Routing Mapper to be able to use these services in QGIS environment. By using this plugin you can calculate a route in QGIS by pointing start and stop points without having road network data. Also you can get alternative routes by using different services. Results could be transformed to different gis formats like ShapeFile, TAB, Spatialite, DXF etc. in QGIS. The plugins initial version (v0.7) supports Google Direction API, HERE API and YourNavigation API for calculation of routes.
Firstly start QGIS and add a basemap using OpenLayers plugin. Basemap helps us to determine start and stop point in QGIS canvas. In this sample i added OSM Humanitarian basemap.
Than open Online Routing Mapped plugin by clicking the icon. The plugin’s window is shown below. It basically consists of three parts: 1- Service selection, 2-Choosing start and stop points and 3- Running the analysis.
I calculated the shortest path between İstanbul and Ankara cities as first sample. The plugin’s window for this sample is shown below.
And here is the result.
In this example Google Direction API was used. You can use different services for these start and stop points, just change the Online Service section and click Run button again. By the way you can also compare the results.
The alternative routes calculated by using different services for same start and stop points and the result is shown below. Google Direcion, HERE and YourNavigation API were used this sample.
Sometimes Online Routing Mapper plugin could not generate any result according to choosen online service. The error message is shown below. In this case I suggest you to change online service and try again.
Also accuracy of the results produced using the Google Direction API could be different by distance between start and stop points. For example the route between two city could be coarse on curved turns.