简体   繁体   中英

Graph structure for trip planning algorithms

As a disclaimer, I am quite new to graph databases and graph programming in general.

As part of my project, I need a graph build from a road network with points of interest, which have categories. So far I have downloaded an OSM file for a city and I have the JSON file of the points of interest for that city. I also tried to use the GraphHopper instance, but I can't find a way to add the points of interest to the graph.

Now I need to build the road network graph (undirected, distances as edge weights and the points of interest assigned to the vertices). The graph itself is then needed for my main task, which is implementing complex algorithms for trip planning queries.

What I thought about until now was to convert the OSM file to JSON and to merge the two JSON files (for the map and the points of interest) programmatically, creating a graph data structure using adjacency lists. The reason I wanted to use something like GraphHopper was to be able to use the already implemented shortest path algorithms, which I need for my project.

Do you know of any software that could help me to achieve my task better and would you recommend me to just create the data structure and algorithms myself?

Thank you!

If it is graphs you are looking for, I suggest you look into jgrapht . It's a library with all the graph implementations. And it comes with really good documentation and examples in the package. If you are familiar with graphs, it wouldn't be hard for you to use it at all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM