How to make an custom *.osm.pbf that can open by qraphhopper

hello,everyone! I now is developing an indoor map with jsom,And I need the function of routing.I want to know the detail of the data structs and how to create the route with offline data. thanks

Hi! Great idea! You’re using JOSM, meaning you can draw a map and save it, and it will take care of the data structures for you. GraphHopper assumes the regular OpenStreetMap tagging scheme – just draw some roads, like they look in the rest of the map, and GraphHopper will use them for routing. There’s really not much more to be said about it.

Now, when you draw and save something with JOSM, which is not committed to OpenStreetMap, JOSM assigns negative node numbers to your newly-created nodes. I am not sure how GraphHopper likes those, I have never tried that. If this doesn’t work, you would have to post-process the XML file (I would recommend using the XML file format and not PBF in your case) and renumber all the nodes.

Let us know how it goes!

thank you ! I find the dijkstra,thanks