OSM way ids are not in the path details


I am kind of lost… Can someone please help me with how I can get the OSM way ids?
Previously I retrieved the osm-way-ids from the path details (after adding to the encoded values in config)…

    hopper.getCHPreparationHandler().setCHProfiles(new CHProfile("car"));
    return hopper;

public static void routing(GraphHopper hopper) {
    GHRequest req = new GHRequest(38.97283745, -77.06720901,38.94379886, -77.06623885).  
    GHResponse rsp = hopper.route(req);
     // handle errors
            if (rsp.hasErrors())
                throw new RuntimeException(rsp.getErrors().toString());
            ResponsePath path = rsp.getBest();

            Map<String, List<PathDetail>> details = path.getPathDetails();

But Now it says it cannot find the osm-way-ids in path details. Where did the osm-way-ids go? How can I retrive those now?

What do you mean you it worked previously? Maybe you ran a new import and forgot to add the osm_way_id this time? Or you are using another -gh folder now?

Previously it worked. But now, after I delete the gh folder and ran it again (with osm-way-id in encoded values), it gives me this error. Don’t understand why… in the config file, osm-way-id is there

But in the docs why it does not show it?

The configuration you are showing here is all commented out.

Oh… i just copied that from online. here is my config. Also, I put 0 for distance influence, that means it should only take fastest route right?


You need

graph.encoded_values: osm_way_id


  encoded_values: osm_way_id


Oh thank you. Silly me. However, another thing just happened. If I add more attributes with/wo space after comma, it gives me same error.


without the space it should work

I tried without space. However, I basically need the osm-ids for now, so it is fine.

I have another question here How the speed is calculated during routing. I am trying to understand the purpose of CarAverageSpeedParser. Could you please help me with the question? The speed map in CarAverageSpeedParser are the speeds that calculate the weights of links for calculating a route?

Thank you so much

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