Hello, I am currently migrating from version 2 to version 10, and I am loading my OSM files from before. However, when I load my old OSM files, there are errors that says “Invalid OSM Node ID” because it is negative. May I know what does the negative Node ID means and how does it actually affect the overall usage of the service? Can I get advise for this - to possibly change my IDs or change the logic of the code…?
Additionally, I have also came across an error that says that “Graph after reading OSM must not be empty”. However, when I open my “.osm.pbf” file in QGIS or JOSM, I can see my map and I dont see why is the graph empty. The attributes for those IDs are also negative as well.
I have tried that and I believe the main issue may not be the numbering because after that I still faced an issue of not being able to read the OSM file properly as the map. Is there any changes that I should be wary of when upgrading such a major jump in versions? Right now the error that I am seeing is “Graph after reading OSM must not be empty”.
I am unsure what graphopper checks under the hood but the only time I have encountered that error is where there is something wrong with the data such that graphopper does not read any roads in i.e. the graph is empty.
I think in my case it was because it was custom data that we built and the ways where missing the “highway” tag or some other tag that it required, so no ways where read in. It may be worth downloading some osm data and comparing the tags in your data to valid osm data and confirming that everything aligns.
Hi @MeirR, appreciate your response. I have done comparison with the sample that the Graphhopper Team provided, i.e. Berlin Map. I have “highway” tags and those are valid inside the Road Class. I went to traced a little bit and it seems like graph-cache needs to be generated or something, which I am unable to generate with my OSM. Did you face any issue with generating the graph-cache with your map? Thanks a lot!
Hi @MeirR , I have found the solution to the problem that I faced. I used the osmium renumber tool to renumber my OSM files, but I need to sort first before renumber. Then regarding the “Graph after reading OSM must not be empty” error, it is because the code is looking for the graph-cache folder, which mine was empty.
I also used the JOSM app to save it as a proper file where I could open it in XML format. Then I realised that I have some tags which was improper, especially the <tag k=’highway’ v=’<something else>’. I would need to change the <something else> to primary or something that is proper.
Hence, in this case, I generated the graph-cache through running the graphhopper command import before running server command.