public void Match_Response() { var locations = new LocationWithTimestamp[] { new LocationWithTimestamp(52.542648, 13.393252, 1424684612), new LocationWithTimestamp(52.543079, 13.394780, 1424684616), new LocationWithTimestamp(52.542107, 13.397389, 1424684620) }; var request = new MatchRequest() { Locations = locations, Instructions = true, Classify = true }; var result = osrm.Match(request); CheckStatus200(result); Assert.IsTrue(result.Matchings.Length > 0); Assert.IsTrue(result.Matchings[0].Instructions.Length > 0); Assert.IsNotNull(result.Matchings[0].Confidence); }
/// <summary> /// Map matching matches given GPS points to the road network in the most plausible way. /// Currently the algorithm works best with trace data that has a sample resolution of 5-10 samples/min. /// Please note the request might result multiple sub-traces. /// Large jumps in the timestamps (>60s) or improbable transitions lead to trace splits if a complete matching could not be found. /// The algorithm might not be able to match all points. /// Outliers are removed if they can not be matched successfully. /// </summary> /// <param name="requestParams"></param> /// <returns></returns> public MatchResponse Match(MatchRequest requestParams) { return(Send <MatchResponse>(MatchServiceName, requestParams.UrlParams)); }