I got a wrong route, why?

I have a shp file, and export it to pbf file by josm. I can get the right shortest path in QGIS, but the graphhopper return only 2 points, and these 2 points are not in the shortest path. What’s wrong with my code? I’m using graphhopper-core 7.0.

        GraphHopper hopper = createGraphHopperInstance("E:\\zsj\\GraphHopper\\road_all_final.pbf");
        GHRequest req = new GHRequest(37.169744, 109.178349, 37.169365, 109.174949).
        GHResponse rsp = hopper.route(req);
        if (rsp.hasErrors()) {
        } else {
            List<ResponsePath> list = rsp.getAll();
            for (ResponsePath path : list) {
                // There are only two points in path.getWaypoints(): [37.1619128, 37.1622265], [109.1629321, 109.1626639]

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