I’m using GraphHopper for a simulation and I would like to sample a route. I can calculate the route between start and end and get the Point- and Instructionlist. Is it possible that I get a Pointliste which is sampled in e.g. 5m distances and the unique edge id of the point?
In general I’m working with cells on my simulation and I would like to sample the graph edge with 5x5m cells (it is enough to get a GPS coordinate in the cell middle, which is the road).
My objects does not have got the dge_id, I’m using Java with GraphHopper 9.0-pre1 and this is my code excerpt, and the ? should be the edge ID
final ResponsePath l_path = l_response.getBest();
final InstructionList l_instructions = l_path.getInstructions();
final List<EdgePoint> l_points = new ArrayList<>();
for ( final Instruction l_edge : l_instructions )
if ( l_edge.getSign() != 4 && l_edge.getSign() != 5 )
for ( final GHPoint3D l_point : l_edge.getPoints() )
l_points.add( new EdgePoint( l_point.lat, l_point.lon, ? ) );
I think the edge is the OSM id, is this correct? How can I query the GPS data of an edge or map the points in the given pointlist in relation to my edge?
Yes I would like to resample the geometry? I think this is a line with a gps start- and endpoint?
My goal is to sample the edge in e.g. 4m distance steps