{"id":1244,"date":"2017-03-14T16:32:35","date_gmt":"2017-03-14T16:32:35","guid":{"rendered":"https:\/\/www.discoverpassenger.com\/?p=1244"},"modified":"2026-08-07T07:25:58","modified_gmt":"2026-08-07T06:25:58","slug":"towards-virtual-touching-out-gps-based-network-matching","status":"publish","type":"post","link":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/","title":{"rendered":"Towards virtual &#8216;touching out&#8217;: GPS-based network matching"},"content":{"rendered":"<div class=\"block-\">The ability to accurately track passenger journeys is a prerequisite of advanced transport services and analytical applications, ranging from estimating bus occupancy factors to account-based ticketing. This is easy enough with dedicated hardware infrastructure, such as onboard smart-card readers, where passengers \u2018touch in\u2019 and \u2018touch out\u2019, but it isn\u2019t cheap. Savvy operators are looking for innovative ways to achieve the same end, without investing significantly in the purchase and maintenance of yet more hardware.<\/p>\n<p>At Passenger we have taken a different approach by leveraging timestamped GPS location data from the mobile phones of passengers. While the \u2018touch in\u2019 event is relatively easy to identify using a set of simple rules, e.g. displaying the ticket on the phone in a vicinity of a bus stop, virtual \u2018touch out\u2019 events are much more challenging, and hence require some smart engineering and machine learning to be flagged correctly. Our approach is based on first identifying the bus service the passenger is travelling on and then waiting for the trajectories of the bus and passenger to diverge. Solving this \u201cnetwork matching\u201d problem also unlocks other applications like for example <a href=\"https:\/\/www.discoverpassenger.com\/2017\/02\/16\/mobile-app-crowdsensing-to-increase-revenues-through-advertising\/\" target=\"_blank\" rel=\"noopener\">smart advertising<\/a>.<\/p>\n<p>There are many possible approaches to tackle this problem, and one of them is called <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dynamic_time_warping\" target=\"_blank\" rel=\"noopener\">Dynamic Time Warping<\/a> (DTW). This algorithm tries to align two sequences of points of the same or not-very-different lengths. DTW has been applied in many fields such as medicine, speech recognition, the study of earthquakes, and fitness wearables. In our case, the algorithm is used to compare a given GPS trace to every possible bus route and then select the closest match, according to DTW distance measure. Python code for DTW is available in <a href=\"https:\/\/github.com\/wearebase\/dtw\" target=\"_blank\" rel=\"noopener\">our repository<\/a>.<\/p>\n<p>One of the results is shown below. On the map, red markers represent bus stops, while blue markers are user GPS locations. The matrix below the map represents the match between these two sequences. For example, in the bottom left corner, it can be seen that the first two user locations match the first bus stop. This may mean that the bus was stationary for a couple of minutes before departing.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-12557 size-full aligncenter\" src=\"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw.png\" alt=\"Map with a matching example\" width=\"828\" height=\"361\" srcset=\"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw.png 828w, https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-300x131.png 300w, https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-768x335.png 768w\" sizes=\"auto, (max-width: 828px) 100vw, 828px\" \/><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-12558 size-full aligncenter\" src=\"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-matrix.png\" alt=\"Warping Matrix\" width=\"784\" height=\"398\" srcset=\"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-matrix.png 784w, https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-matrix-300x152.png 300w, https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-matrix-768x390.png 768w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><\/p>\n<p>One of the problems we found is that DTW doesn\u2019t work well if sequences have very different lengths and, unfortunately, this is a common case in our data. A bus route can have tens of stops, but the trace of a user could only cover a few of them. Thus, we need to \u201ccrop\u201d the longer sequence before applying DTW.<\/p>\n<p>We found that this approach is relatively fast (it takes less than a second to match one journey), but the execution time of this algorithm depends on the length of sequences and the number of bus routes in the network. By pre-selecting the possible bus routes in a bounding box delimited by user GPS coordinates, we can speed up the matching process and directly deploy this virtual \u2018touch out\u2019 to mobile phones.<\/p>\n<p>Our data science team is developing approaches to make this detection faster and even more accurate. If you are interested in this technology and would like to know more, please <a href=\"https:\/\/www.discoverpassenger.com\/contact\/\">get in touch<\/a>.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A dedicated hardware infrastructure to support &#8216;touching in and out&#8217; can be expensive. We have taken a different approach by leveraging timestamped GPS location data from the mobile phones of passengers instead. Find out how Dynamic Time Warping algorithm can help us to identify the bus service the passenger is travelling on.<\/p>\n","protected":false},"author":7,"featured_media":12556,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[70],"tags":[64],"class_list":["post-1244","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-passenger-team","tag-intelligent-mobility","passenger-team"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Towards virtual &#039;touching out&#039;: GPS-based network matching - Masabi<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Towards virtual &#039;touching out&#039;: GPS-based network matching - Masabi\" \/>\n<meta property=\"og:description\" content=\"A dedicated hardware infrastructure to support &#039;touching in and out&#039; can be expensive. We have taken a different approach by leveraging timestamped GPS location data from the mobile phones of passengers instead. Find out how Dynamic Time Warping algorithm can help us to identify the bus service the passenger is travelling on.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/\" \/>\n<meta property=\"og:site_name\" content=\"Masabi\" \/>\n<meta property=\"article:published_time\" content=\"2017-03-14T16:32:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-07T06:25:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-invert.png\" \/>\n\t<meta property=\"og:image:width\" content=\"828\" \/>\n\t<meta property=\"og:image:height\" content=\"361\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"TomQuay\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"TomQuay\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/\"},\"author\":{\"name\":\"TomQuay\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/#\\\/schema\\\/person\\\/7f9321d16421f5dd31179aec75bd022d\"},\"headline\":\"Towards virtual &#8216;touching out&#8217;: GPS-based network matching\",\"datePublished\":\"2017-03-14T16:32:35+00:00\",\"dateModified\":\"2026-08-07T06:25:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/\"},\"wordCount\":524,\"image\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.masabi.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/dtw-invert.png\",\"keywords\":[\"Intelligent mobility\"],\"articleSection\":[\"Passenger team\"],\"inLanguage\":\"es\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/\",\"url\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/\",\"name\":\"Towards virtual 'touching out': GPS-based network matching - Masabi\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.masabi.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/dtw-invert.png\",\"datePublished\":\"2017-03-14T16:32:35+00:00\",\"dateModified\":\"2026-08-07T06:25:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/#\\\/schema\\\/person\\\/7f9321d16421f5dd31179aec75bd022d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.masabi.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/dtw-invert.png\",\"contentUrl\":\"https:\\\/\\\/www.masabi.com\\\/wp-content\\\/uploads\\\/2017\\\/03\\\/dtw-invert.png\",\"width\":828,\"height\":361},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/news\\\/towards-virtual-touching-out-gps-based-network-matching\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Towards virtual &#8216;touching out&#8217;: GPS-based network matching\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/#website\",\"url\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/\",\"name\":\"Masabi\",\"description\":\"Making shared transport the first choice\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.masabi.com\\\/es\\\/#\\\/schema\\\/person\\\/7f9321d16421f5dd31179aec75bd022d\",\"name\":\"TomQuay\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g\",\"caption\":\"TomQuay\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Towards virtual 'touching out': GPS-based network matching - Masabi","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/","og_locale":"es_ES","og_type":"article","og_title":"Towards virtual 'touching out': GPS-based network matching - Masabi","og_description":"A dedicated hardware infrastructure to support 'touching in and out' can be expensive. We have taken a different approach by leveraging timestamped GPS location data from the mobile phones of passengers instead. Find out how Dynamic Time Warping algorithm can help us to identify the bus service the passenger is travelling on.","og_url":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/","og_site_name":"Masabi","article_published_time":"2017-03-14T16:32:35+00:00","article_modified_time":"2026-08-07T06:25:58+00:00","og_image":[{"width":828,"height":361,"url":"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-invert.png","type":"image\/png"}],"author":"TomQuay","twitter_card":"summary_large_image","twitter_misc":{"Escrito por":"TomQuay","Tiempo de lectura":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/#article","isPartOf":{"@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/"},"author":{"name":"TomQuay","@id":"https:\/\/www.masabi.com\/es\/#\/schema\/person\/7f9321d16421f5dd31179aec75bd022d"},"headline":"Towards virtual &#8216;touching out&#8217;: GPS-based network matching","datePublished":"2017-03-14T16:32:35+00:00","dateModified":"2026-08-07T06:25:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/"},"wordCount":524,"image":{"@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/#primaryimage"},"thumbnailUrl":"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-invert.png","keywords":["Intelligent mobility"],"articleSection":["Passenger team"],"inLanguage":"es"},{"@type":"WebPage","@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/","url":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/","name":"Towards virtual 'touching out': GPS-based network matching - Masabi","isPartOf":{"@id":"https:\/\/www.masabi.com\/es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/#primaryimage"},"image":{"@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/#primaryimage"},"thumbnailUrl":"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-invert.png","datePublished":"2017-03-14T16:32:35+00:00","dateModified":"2026-08-07T06:25:58+00:00","author":{"@id":"https:\/\/www.masabi.com\/es\/#\/schema\/person\/7f9321d16421f5dd31179aec75bd022d"},"breadcrumb":{"@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/#primaryimage","url":"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-invert.png","contentUrl":"https:\/\/www.masabi.com\/wp-content\/uploads\/2017\/03\/dtw-invert.png","width":828,"height":361},{"@type":"BreadcrumbList","@id":"https:\/\/www.masabi.com\/es\/news\/towards-virtual-touching-out-gps-based-network-matching\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.masabi.com\/es\/"},{"@type":"ListItem","position":2,"name":"Towards virtual &#8216;touching out&#8217;: GPS-based network matching"}]},{"@type":"WebSite","@id":"https:\/\/www.masabi.com\/es\/#website","url":"https:\/\/www.masabi.com\/es\/","name":"Masabi","description":"Making shared transport the first choice","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.masabi.com\/es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Person","@id":"https:\/\/www.masabi.com\/es\/#\/schema\/person\/7f9321d16421f5dd31179aec75bd022d","name":"TomQuay","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/670e69485b65f2c5a6ee3fb9d0e3ed3163fb4107b7ab9ade42394576b7d42571?s=96&d=mm&r=g","caption":"TomQuay"}}]}},"_links":{"self":[{"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/posts\/1244","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/comments?post=1244"}],"version-history":[{"count":0,"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/posts\/1244\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/media\/12556"}],"wp:attachment":[{"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/media?parent=1244"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/categories?post=1244"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.masabi.com\/es\/wp-json\/wp\/v2\/tags?post=1244"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}