Hi. I’m working in an Android Java app that needs to snap to road the car GPS points recorded one to one. I need a one to one mapping in order to keep the speed of each point and check it against the maxspeed of the road.
My code is as follows:
Profile profile=new Profile("car");
profile.getHints().putObject("profile", "car");
MapHandler.getMapHandler().getHopper().setProfiles(profile);
mapMatching=new MapMatching(MapHandler.getMapHandler().getHopper(),profile.getHints());
matchResult=mapMatching.doWork(observations);
//List of points to paint the route
PointList list= matchResult.getEdgeMatches().get(0).getEdgeState().fetchWayGeometry(FetchMode.ALL);
But when I call it with a list of 11 observations, the result in matchResult (and also in list) only has 2 snapped points.
How can I obtain a list of 11 snapped points, corresponding to the 11 observations?
Thanks for any hint,