0

I am new in OSM but now I need create application which will use GIS (Geoserver) and will be provide service to get road from point A to point B.

I found some informations about this but I still have any questions. My is download open street maps and extract to database (PostgreSQL), and for routing use plugin pgRouting. Next connect db to map server and provide api for clients.

Questions: 1. Is that correct way? 2. How osm format could I use for postgre? (osm.pbf? shp.zip?, or something else?)

Thanks for answers

Aligator
  • 737
  • 2
  • 10
  • 23
  • 1
    cross-posted: https://gis.stackexchange.com/questions/214371/using-openstreetmap-for-routing-in-geoserver – scai Oct 16 '16 at 09:31
  • There is a shapefile plugin for GraphHopper under development: https://github.com/graphhopper/graphhopper/pull/616 – Karussell Oct 16 '16 at 13:28

1 Answers1

3

Let me elaborate, what things needed to start till end:

  • First you need to download, OSM data, for which you can simply use Overpass API.

  • OSM2PO JAVA based CLI tool to convert OSM data into routable data, here is the good guidline how to use this tool.

  • Postgresql with postgis and pgRouting extensions, you will use dijkstra algorithm to get shortest route, or any other algorithm that best suits you.

  • Finally you will need Geoserver, that will provide OGC standards e.g. WMS and WFS, through which you can get your route in raster or vector format, you can store your table as layers and you may need a SQL View.

  • Further, for front end you can use OpenLayers, which is a JavaScript Web Mapping Library or you can use Leaflet, You can easily do WMS and WFS requests from these libraries to Geoserver and Geoserver will send you a response, with your requested data, if request is correct.

NOTE: You can use QGIS v2 with pgRouting plugin for testing.