{"action":"created","comment":{"url":"https://api.github.com/repos/valhalla/thor/pulls/comments/90661677","pull_request_review_id":11180770,"id":90661677,"diff_hunk":"@@ -79,24 +76,33 @@ worker_t::result_t thor_worker_t::trace_attributes(\n   parse_locations(request);\n   parse_shape(request);\n   parse_costing(request);\n+  /*\n+   * A flag indicating whether the input shape is a GPS trace or exact points from a\n+   * prior route run against the Valhalla road network.  Knowing that the input is from\n+   * Valhalla will allow an efficient “edge-walking” algorithm rather than a more extensive\n+   * map-matching method. If true, this enforces to only use exact route match algorithm.\n+   */\n+  bool exact_match = request.get<bool>(\"exact_match_only\", false);\n \n   TripPathController controller;\n   // TODO parse include/exclude and set controller as needed - for now just default\n \n- // worker_t::result_t result { false  };\n-  // Forward the original request\n- // result.messages.emplace_back(request_str);\n-\n   // If the exact points from a prior route that was run agains the Valhalla road network,\n   //then we can traverse the exact shape to form a path by using edge-walking algorithm\n-  auto trip_path = route_match(controller);\n+  odin::TripPath trip_path = route_match(controller);\n   if (trip_path.node().size() == 0) {\n-    //If no Valhalla route match, then use meili map matching\n-    //to match to local route network. No shortcuts are used and detailed\n-    //information at every intersection becomes available.\n-    trip_path = map_match(controller);\n+    if (!exact_match) {\n+      //If no Valhalla route match, then use meili map matching to match to local route network.\n+      //No shortcuts are used and detailed information at every intersection becomes available.\n+      LOG_INFO(\"Could not find exact route match; Sending trace to map_match...\");\n+      try {\n+        trip_path = map_match(controller);\n+      } catch (...) {\n+        valhalla_exception_t{400, 444};\n+      }\n+    } else throw valhalla_exception_t{400, 443};\n   }\n-  json::MapPtr json;\n+  odin::EnhancedTripPath* etrip_path = static_cast<odin::EnhancedTripPath*>(&trip_path);","path":"src/thor/trace_attributes_action.cc","position":96,"original_position":96,"commit_id":"1c194a37273cdd98778de13051228adb88435232","original_commit_id":"1c194a37273cdd98778de13051228adb88435232","user":{"login":"kevinkreiser","id":697548,"avatar_url":"https://avatars.githubusercontent.com/u/697548?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinkreiser","html_url":"https://github.com/kevinkreiser","followers_url":"https://api.github.com/users/kevinkreiser/followers","following_url":"https://api.github.com/users/kevinkreiser/following{/other_user}","gists_url":"https://api.github.com/users/kevinkreiser/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinkreiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinkreiser/subscriptions","organizations_url":"https://api.github.com/users/kevinkreiser/orgs","repos_url":"https://api.github.com/users/kevinkreiser/repos","events_url":"https://api.github.com/users/kevinkreiser/events{/privacy}","received_events_url":"https://api.github.com/users/kevinkreiser/received_events","type":"User","site_admin":false},"body":"why convert this?","created_at":"2016-12-02T15:30:37Z","updated_at":"2016-12-02T15:30:37Z","html_url":"https://github.com/valhalla/thor/pull/487#discussion_r90661677","pull_request_url":"https://api.github.com/repos/valhalla/thor/pulls/487","_links":{"self":{"href":"https://api.github.com/repos/valhalla/thor/pulls/comments/90661677"},"html":{"href":"https://github.com/valhalla/thor/pull/487#discussion_r90661677"},"pull_request":{"href":"https://api.github.com/repos/valhalla/thor/pulls/487"}}},"pull_request":{"url":"https://api.github.com/repos/valhalla/thor/pulls/487","id":96293116,"html_url":"https://github.com/valhalla/thor/pull/487","diff_url":"https://github.com/valhalla/thor/pull/487.diff","patch_url":"https://github.com/valhalla/thor/pull/487.patch","issue_url":"https://api.github.com/repos/valhalla/thor/issues/487","number":487,"state":"open","locked":false,"title":"Added Exact Match Flag for Trace Route & Attributes","user":{"login":"kdiluca","id":12497844,"avatar_url":"https://avatars.githubusercontent.com/u/12497844?v=3","gravatar_id":"","url":"https://api.github.com/users/kdiluca","html_url":"https://github.com/kdiluca","followers_url":"https://api.github.com/users/kdiluca/followers","following_url":"https://api.github.com/users/kdiluca/following{/other_user}","gists_url":"https://api.github.com/users/kdiluca/gists{/gist_id}","starred_url":"https://api.github.com/users/kdiluca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdiluca/subscriptions","organizations_url":"https://api.github.com/users/kdiluca/orgs","repos_url":"https://api.github.com/users/kdiluca/repos","events_url":"https://api.github.com/users/kdiluca/events{/privacy}","received_events_url":"https://api.github.com/users/kdiluca/received_events","type":"User","site_admin":false},"body":"- also refactored to use Enhanced Trip Path","created_at":"2016-12-02T14:54:29Z","updated_at":"2016-12-02T15:30:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"844912d0136a9451a3ec4da5b16759c16b9f9ee5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/valhalla/thor/pulls/487/commits","review_comments_url":"https://api.github.com/repos/valhalla/thor/pulls/487/comments","review_comment_url":"https://api.github.com/repos/valhalla/thor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/valhalla/thor/issues/487/comments","statuses_url":"https://api.github.com/repos/valhalla/thor/statuses/1c194a37273cdd98778de13051228adb88435232","head":{"label":"valhalla:kdiluca-matchflag","ref":"kdiluca-matchflag","sha":"1c194a37273cdd98778de13051228adb88435232","user":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"repo":{"id":28186592,"name":"thor","full_name":"valhalla/thor","owner":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valhalla/thor","description":"Tiled Hierarchical Open Routing - a routing engine backed by tiled open source routing data","fork":false,"url":"https://api.github.com/repos/valhalla/thor","forks_url":"https://api.github.com/repos/valhalla/thor/forks","keys_url":"https://api.github.com/repos/valhalla/thor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valhalla/thor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valhalla/thor/teams","hooks_url":"https://api.github.com/repos/valhalla/thor/hooks","issue_events_url":"https://api.github.com/repos/valhalla/thor/issues/events{/number}","events_url":"https://api.github.com/repos/valhalla/thor/events","assignees_url":"https://api.github.com/repos/valhalla/thor/assignees{/user}","branches_url":"https://api.github.com/repos/valhalla/thor/branches{/branch}","tags_url":"https://api.github.com/repos/valhalla/thor/tags","blobs_url":"https://api.github.com/repos/valhalla/thor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valhalla/thor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valhalla/thor/git/refs{/sha}","trees_url":"https://api.github.com/repos/valhalla/thor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valhalla/thor/statuses/{sha}","languages_url":"https://api.github.com/repos/valhalla/thor/languages","stargazers_url":"https://api.github.com/repos/valhalla/thor/stargazers","contributors_url":"https://api.github.com/repos/valhalla/thor/contributors","subscribers_url":"https://api.github.com/repos/valhalla/thor/subscribers","subscription_url":"https://api.github.com/repos/valhalla/thor/subscription","commits_url":"https://api.github.com/repos/valhalla/thor/commits{/sha}","git_commits_url":"https://api.github.com/repos/valhalla/thor/git/commits{/sha}","comments_url":"https://api.github.com/repos/valhalla/thor/comments{/number}","issue_comment_url":"https://api.github.com/repos/valhalla/thor/issues/comments{/number}","contents_url":"https://api.github.com/repos/valhalla/thor/contents/{+path}","compare_url":"https://api.github.com/repos/valhalla/thor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valhalla/thor/merges","archive_url":"https://api.github.com/repos/valhalla/thor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valhalla/thor/downloads","issues_url":"https://api.github.com/repos/valhalla/thor/issues{/number}","pulls_url":"https://api.github.com/repos/valhalla/thor/pulls{/number}","milestones_url":"https://api.github.com/repos/valhalla/thor/milestones{/number}","notifications_url":"https://api.github.com/repos/valhalla/thor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valhalla/thor/labels{/name}","releases_url":"https://api.github.com/repos/valhalla/thor/releases{/id}","deployments_url":"https://api.github.com/repos/valhalla/thor/deployments","created_at":"2014-12-18T14:25:42Z","updated_at":"2016-11-29T04:15:59Z","pushed_at":"2016-12-02T14:54:29Z","git_url":"git://github.com/valhalla/thor.git","ssh_url":"git@github.com:valhalla/thor.git","clone_url":"https://github.com/valhalla/thor.git","svn_url":"https://github.com/valhalla/thor","homepage":null,"size":9799,"stargazers_count":106,"watchers_count":106,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":28,"forks":19,"open_issues":28,"watchers":106,"default_branch":"master"}},"base":{"label":"valhalla:master","ref":"master","sha":"d4611c4601e44bb7dbce88dab33abfc41745c9fe","user":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"repo":{"id":28186592,"name":"thor","full_name":"valhalla/thor","owner":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valhalla/thor","description":"Tiled Hierarchical Open Routing - a routing engine backed by tiled open source routing data","fork":false,"url":"https://api.github.com/repos/valhalla/thor","forks_url":"https://api.github.com/repos/valhalla/thor/forks","keys_url":"https://api.github.com/repos/valhalla/thor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valhalla/thor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valhalla/thor/teams","hooks_url":"https://api.github.com/repos/valhalla/thor/hooks","issue_events_url":"https://api.github.com/repos/valhalla/thor/issues/events{/number}","events_url":"https://api.github.com/repos/valhalla/thor/events","assignees_url":"https://api.github.com/repos/valhalla/thor/assignees{/user}","branches_url":"https://api.github.com/repos/valhalla/thor/branches{/branch}","tags_url":"https://api.github.com/repos/valhalla/thor/tags","blobs_url":"https://api.github.com/repos/valhalla/thor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valhalla/thor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valhalla/thor/git/refs{/sha}","trees_url":"https://api.github.com/repos/valhalla/thor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valhalla/thor/statuses/{sha}","languages_url":"https://api.github.com/repos/valhalla/thor/languages","stargazers_url":"https://api.github.com/repos/valhalla/thor/stargazers","contributors_url":"https://api.github.com/repos/valhalla/thor/contributors","subscribers_url":"https://api.github.com/repos/valhalla/thor/subscribers","subscription_url":"https://api.github.com/repos/valhalla/thor/subscription","commits_url":"https://api.github.com/repos/valhalla/thor/commits{/sha}","git_commits_url":"https://api.github.com/repos/valhalla/thor/git/commits{/sha}","comments_url":"https://api.github.com/repos/valhalla/thor/comments{/number}","issue_comment_url":"https://api.github.com/repos/valhalla/thor/issues/comments{/number}","contents_url":"https://api.github.com/repos/valhalla/thor/contents/{+path}","compare_url":"https://api.github.com/repos/valhalla/thor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valhalla/thor/merges","archive_url":"https://api.github.com/repos/valhalla/thor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valhalla/thor/downloads","issues_url":"https://api.github.com/repos/valhalla/thor/issues{/number}","pulls_url":"https://api.github.com/repos/valhalla/thor/pulls{/number}","milestones_url":"https://api.github.com/repos/valhalla/thor/milestones{/number}","notifications_url":"https://api.github.com/repos/valhalla/thor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valhalla/thor/labels{/name}","releases_url":"https://api.github.com/repos/valhalla/thor/releases{/id}","deployments_url":"https://api.github.com/repos/valhalla/thor/deployments","created_at":"2014-12-18T14:25:42Z","updated_at":"2016-11-29T04:15:59Z","pushed_at":"2016-12-02T14:54:29Z","git_url":"git://github.com/valhalla/thor.git","ssh_url":"git@github.com:valhalla/thor.git","clone_url":"https://github.com/valhalla/thor.git","svn_url":"https://github.com/valhalla/thor","homepage":null,"size":9799,"stargazers_count":106,"watchers_count":106,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":28,"forks":19,"open_issues":28,"watchers":106,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/valhalla/thor/pulls/487"},"html":{"href":"https://github.com/valhalla/thor/pull/487"},"issue":{"href":"https://api.github.com/repos/valhalla/thor/issues/487"},"comments":{"href":"https://api.github.com/repos/valhalla/thor/issues/487/comments"},"review_comments":{"href":"https://api.github.com/repos/valhalla/thor/pulls/487/comments"},"review_comment":{"href":"https://api.github.com/repos/valhalla/thor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/valhalla/thor/pulls/487/commits"},"statuses":{"href":"https://api.github.com/repos/valhalla/thor/statuses/1c194a37273cdd98778de13051228adb88435232"}}}}
{"actor":{"display_login":"kevinkreiser"}}