Map-matching algorithms integrate positioning data with spatial road netwok data to identify thr correct link on which a vehicle is travelling and to determine the location of a vehicle on a link. Various map-matching algorithms has been derived from literatures.
BMap recently released a service named Yingyan Trace, which offered users APIs to upload positioning points, generate and manage traces, and map discrete GPS points to continuous trajectories based on road network.
Preparation
Floating Car Data
Floating car data (FCD) is collection of GPS records about driving status, regularly sampled from GPS equipment in vehicles.
GPS records of a taxi on Nov. 18th, 2014, were used to this case study.
ID: 1379
Records in total: 616
While adjacent points are lined, lines do not coincide with road network.
BMap API Key
Create an application on BMap API Console, and get a API key.
UPload
API Description
http://lbsyun.baidu.com/index.php?title=yingyan/api/v3/trackupload
addpoint - Upload a single point Interface Description upload a track point for an entity Request URI URI:http://yingyan.baidu.com/api/v3/track/addpoint HTTP Request Mode POST Request ParameterReturn Value
Uploading
Transformat records to wget post request:
Example: wget –post-data=”ak=0QG***SRL&service_id=13**16&entity_name=1379&longitude=116.***090&latitude=39.***810&loc_time=1479258504&coord_type_input=wgs84&load= ” http://yingyan.baidu.com/api/v3/track/addpoint
Manage
Map-Matching: tied road network
DOwnload
API Desctiption
http://lbsyun.baidu.com/index.php?title=yingyan/api/v3/trackprocess
gettrack - trajectory correction Interface Description Real-time query for an entity within a period of time travel information: from the end, the total mileage, fees mileage, track point list. Support for track denoising, pumping thin, tied, mileage compensation and so on. Request URI URI: http://yingyan.baidu.com/api/v3/track/gettrack HTTP Request Mode GET
Downloading
Request following url and get a json file with map-matching results in return:
http://yingyan.baidu.com/api/v3/track/gettrack?ak=0QG***SRL&service_id=13**16&entity_name=1379&start_time=1479258504&end_time=1479344904&is_processed=1&process_option=%22need_mapmatch=1%22&sort_type=asc&page_size=5000