Import shp file to graphhopper

Hi everyone,

I want to import a .shp file into graphhopper, but got two questions:

  1. How to import .shp file to graphhopper?

  2. Besides, the data content in my .shp file is different from OSM data. For example, in my .shp file, the road level is defined as expressway, thoroughfare, etc. while in the OSM file it’s motorway, trunk, etc. Does it mean I have to do extra code change to customize graphhopper to support my own .shp file content?

Thank you in advance!

You could try to convert your .shp file to an OSM file. The OSM format is rather simple and in your conversion code you would be able to specify which of your attributes map to the different OSM tags.

Another way would be reading the shape file with somehow and using the low-level GraphHopper API to create the graph directly.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.