GraphHopper.com | Forum | GitHub | Maps | Blog

Working with points of interest


#1

Hello,

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, embedded on the edges. So far I have downloaded an OSM file for a city and I have the JSON file of the PoIs for that city. I also created the GraphHopper instance from the basic example in my java project, although I don’t know much about what to do with it yet.

Now I need to build the road network graph (undirected, distances based on longitude and latitude as edge weights) using adjacency lists and to embed the PoIs from the JSON file on the graph. The graph itself is then needed for my main task, which is implementing algorithms for trip planning queries.

I am stuck for some time on the task of building the graph and I would appreciate any help. Also, if the question is irrelevant to the forum, please let me know.


#2

Hi, the graph to be loaded is not the OSM file but the files in -gh directory, which includes names, edges, etc. So you should convert the OSM file first.

If your OS is windows, you can use babun as the enviroment of Linux, for graphhopper.gh file must be run in Linux. The steps are shown in https://github.com/graphhopper/graphhopper/blob/master/docs/android/index.md.

I hope it can help you.