浏览器版本低!无法浏览完整内容,建议升级或更换浏览器。
第172行: 第172行:
 
| <span style="font-size:x-small;"><span style="color:#555555;">定位时间</span></span><br/>
 
| <span style="font-size:x-small;"><span style="color:#555555;">定位时间</span></span><br/>
 
| <span style="font-size:x-small;"><span style="color:#555555;">unix时间戳</span></span><br/>
 
| <span style="font-size:x-small;"><span style="color:#555555;">unix时间戳</span></span><br/>
| <span style="font-size:x-small;"><span style="color:#555555;">轨迹点的定位时间,使用UNIX时间戳</span></span><span style="font-size:smaller;"><span style="color:#696969;"><br/></span></span>
+
| <span style="font-size:x-small;"><span style="color:#555555;">轨迹点的定位时间,使用UNIX时间戳</span></span><br/>
 
|-
 
|-
| <span style="font-size:smaller;"><span style="color:#696969;"><br/></span></span>
+
| <br/>
 
| colspan="2" | <span style="font-size:smaller;"><span style="color:#696969;">unmatched</span></span>
 
| colspan="2" | <span style="font-size:smaller;"><span style="color:#696969;">unmatched</span></span>
 
| <span style="font-size:smaller;"><span style="color:#696969;">是否匹配</span></span>
 
| <span style="font-size:smaller;"><span style="color:#696969;">是否匹配</span></span>
第312行: 第312行:
 
{{bluepoint}}{{bluepoint}}服务相关配额及并发请求限制请访问[http://lbsyun.baidu.com/apiconsole/auth/privilege 开发者权益]页面查看。
 
{{bluepoint}}{{bluepoint}}服务相关配额及并发请求限制请访问[http://lbsyun.baidu.com/apiconsole/auth/privilege 开发者权益]页面查看。
 
</div><div class="navRemark"><div class="handpointto">内容(更新日志)</div></div><div class="txtstyle2"><div class="updatedemo"><div class="uptitle"><div class="next timecut"></div><div class="prve timecut"></div><div class="updatetime"><div class="controlshow"><div class="timeversions intro">
 
</div><div class="navRemark"><div class="handpointto">内容(更新日志)</div></div><div class="txtstyle2"><div class="updatedemo"><div class="uptitle"><div class="next timecut"></div><div class="prve timecut"></div><div class="updatetime"><div class="controlshow"><div class="timeversions intro">
2019年6月14日
+
2019年6月17日
  
 
Beta V1.0
 
Beta V1.0
 
</div><br/></div></div><div class="linellae"></div></div><div class="updatecenter"><div class="updatebox"><div class="bluetitle"><div class="services-title-text">产品发布</div></div><div class="serve-explain-text">全新轨迹重合率分析API Beta V1.0产品上线</div></div></div></div></div></div>
 
</div><br/></div></div><div class="linellae"></div></div><div class="updatecenter"><div class="updatebox"><div class="bluetitle"><div class="services-title-text">产品发布</div></div><div class="serve-explain-text">全新轨迹重合率分析API Beta V1.0产品上线</div></div></div></div></div></div>

2019年6月17日 (一) 03:25的版本

服务介绍
服务文档
使用指南
更新日志
轨迹重合率分析服务

轨迹重合率分析服务是一类Web API接口服务,用于判断两条轨迹的重合率。

功能介绍
轨迹重合率分析服务

用于判断两条轨迹的重合率(支持对输入轨迹进行纠偏绑路等预处理),可应用于判断实际行驶轨迹与预设路线的重合率或两条路线/轨迹的重合率等场景。

trackmatch%2Ftrackmatchshow1.png


接口功能介绍
轨迹重合率分析API
ttp://api.map.baidu.com/trackmatch/v1/track? //POST请求
请求参数
参数名 参数含义 类型 是否必填 备注
AK 用户的AK,授权使用 string
standard_track 基准轨迹 string 最多不能超过2000个轨迹点,且轨迹里程不超过500公里(注:若轨迹里程超长,可能会出现响应时间过长或超时)。standard_track格式为json, 其中每个point可按序填写以下字段值,其他字段会被舍弃:
latitude,longitude,loc_time,radius,speed,direction,height
取值规则:
latitude:必填,纬度,支持小数点后6位
longitude:必填,经度,支持小数点后6位
loc_time
:不需要纠偏去噪时选填,需要纠偏去噪时必填。轨迹点的定位时间,使用UNIX时间戳
speed:选填,轨迹点的速度,单位:公里/小时
direction:选填,轨迹点的方向,单位:范围为[0,359],0度为正北方向,顺时针方向递增
height:选填,轨迹点的高度,单位:米

示例:
1. 若填写全部字段:["36.2817531985,120.392544449,1542695170,10,0,42,10", "36.2817531985,120.392544449,1542695176,10,0,42,10"]
2. 若省略部分可选字段,如不填speed字段:
["36.2817531985,120.392544449,1542695170,10,,42,10", "36.2817531985,120.392544449,1542695176,10,,42,10"]

track 待匹配轨迹 string 同上
standard_option 基准轨迹的纠偏参数设置 string(0-128) 无默认值,若不填则使用原始轨迹进行重合率分析;若填写,则使用纠偏后轨迹进行重合率分析。
支持以下配置项,多个项之间用”|”竖线相隔:

1. need_mapmatch(绑路)
是否需要将轨迹点绑路并补充道路形状点 ,示例:
need_mapmatch:0 不绑路
need_mapmatch:1 绑路

2. transport_mode(交通方式)
根据不同交通工具选择不同的纠偏策略和参数,目前支持:自动(即鹰眼自动识别的交通方式)、驾车、骑行和步行。示例:
transport_mode:auto
transport_mode:driving
transport_mode:riding
transport_mode:walking

3. denoise_grade(去噪力度)
取值范围[0,5],数值越大去噪力度越大,代表越多的点会被当做噪点去除。若取值0,则代表不去噪。示例:
denoise_grade:0 (不去噪)
denoise_grade:1 (系统默认去噪)
denoise_grade:2(系统默认去噪,同时去除定位精度低于500的轨迹点,相当于保留GPS定位点、大部分Wi-Fi定位点和精度较高的基站定位点)
denoise_grade:3(系统默认去噪,同时去除定位精度低于100的轨迹点,相当于保留GPS定位点和大部分Wi-Fi定位点)
denoise_grade:4(系统默认去噪,同时去除定位精度低于50的轨迹点,相当于保留GPS定位点和精度较高的Wi-Fi定位点)
denoise_grade:5(系统默认去噪,同时去除定位精度低于20的轨迹点,相当于仅保留GPS定位点)

4. vacuate_grade(抽稀力度)
取值范围[0,5],数值越大抽稀度力度越大,代表轨迹会越稀疏。若取值0,则代表不抽稀。示例:
vacuate_grade:0(不抽稀)
vacuate_grade:2(抽稀力度为2)

示例:need_mapmatch:1|transport_mode:auto|denoise_grade:1|vacuate_grade:1

option 待匹配轨迹的纠偏参数设置 string(0-128)

同上

coord_type_input 输入参数standard_track和track中轨迹点的坐标系 string 默认值:bd09ll
取值范围:

gcj02:国测局加密坐标
bd09ll:百度经纬度坐标
wgs84ll:GPS所采用的坐标系

coord_type_output 返回的坐标类型 string 默认值:bd09ll

该字段用于控制返回结果中的坐标类型。可选值为:

gcj02:国测局加密坐标

bd09ll:百度经纬度坐标

该参数仅对国内(包含港、澳、台)轨迹有效,海外区域轨迹均返回 wgs84坐标系

sn 用户的权限签名 string 若用户所用ak的校验方式为sn校验时该参数必须。 sn校验说明
返回参数
参数名 参数含义 类型 备注
status 状态码 int 详见状态码定义
message 响应信息 string 对status的中文描述
similarity 两条轨迹的匹配率 double 轨迹的相似度,取值范围[0,100]
matched_distance
匹配的轨迹里程 double track和standard_track轨迹重合的里程
unmatched_distance 偏离基准轨迹的里程 double unmatched_distance=processed_track_distance-matched_distance
processed_standard_track
纠偏后的基准轨迹
string
仅在填写了standard_option请求参数时返回该字段

loc 轨迹点信息



longitude 经度 double 经度,支持小数点后6位


latitude 纬度 double 纬度,支持小数点后6位

loc_time 定位时间 unix时间戳 轨迹点的定位时间,使用UNIX时间戳
processed_track
纠偏后的待匹配轨迹
string


loc 轨迹点信息




longitude
经度
double
经度,支持小数点后6位


latitude
纬度
double
纬度,支持小数点后6位

loc_time
定位时间
unix时间戳
轨迹点的定位时间,使用UNIX时间戳

unmatched 是否匹配 int 该轨迹点是否与processed_standard_track(若未填standard_option,则是standard_track)匹配。取值规则:
匹配:则不返回该字段
不匹配:值为1

standard_track_distance 原始基准轨迹的里程
double 单位:米
track_distance 原始待匹配轨迹的里程 double 单位:米
processed_standard_track_distance 纠偏后的基准轨迹里程
double 若请求参数未填写standard_option,则采用原始轨迹里程
单位:米

processed_track_distance
纠偏后的待匹配轨迹里程
double 若请求参数未填写option,则采用原始轨迹里程
单位:米

请求示例
trackmatch%2Ftrackmatchshowcase.png

POST BODY中请求参数填写示例
ak:<您的ak>
standard_track:["36.2715924153,120.401133898,1542702871,10,0,182,10", "36.2710674153,120.401122046,1542702922,10,0,196,10","36.2710674153,120.401122046,1542702974,10,0,196,10","36.26970681,120.406126,1542703026,10,47.52,130,10","36.2626899159,120.406257629,1542703079,10,55.46,202,10","36.2554959254,120.401709345,1542703131,10,67.12,196,10","36.2482072286,120.398668032,1542703182,10,61.85,210,10","36.2453202208,120.390573255,1542703234,10,65.87,254,10","36.2462943954,120.378697631,1542703287,10,73.71,290,10","36.2464401658,120.368128971,1542703339,10,73.87,260,10","36.2411743783,120.360663512,1542703391,10,59.18,126,10","36.2359637286,120.364107473,1542703443,10,53.34,170,10","36.2274663652,120.366807035,1542703495,10,76.01,162,10","36.2191917852,120.369949698,1542703547,10,54.52,164,10","36.2115422586,120.371949535,1542703599,10,53.63,168,10","36.2030928069,120.374239653,1542703651,10,63.09,166,10","36.1952276423,120.376376162,1542703703,10,64.96,166,10","36.1863905908,120.378671574,1542703756,10,64.74,174,10","36.1788541312,120.377499973,1542703808,10,63.87,188,10","36.1704235657,120.372412643,1542703860,10,72.4,210,10","36.1634141202,120.367268764,1542703914,10,58.26,210,10","36.1569415328,120.362514475,1542703967,10,58.85,212,10","36.1485292943,120.356262129,1542704019,10,80.31,214,10","36.1393112024,120.347530639,1542704072,10,81.05,222,10","36.1301655849,120.340345789,1542704124,10,77.4,196,10","36.1211280447,120.336765391,1542704177,10,75.24,196,10","36.11300077,120.341976435,1542704230,10,74.88,130,10","36.1073771898,120.346281534,1542704282,10,66.57,196,10","36.0986517057,120.343359644,1542704334,10,65.1,214,10","36.0932847733,120.33390827,1542704386,10,79.48,222,10","36.0858251826,120.32623366,1542704439,10,58.41,196,10","36.0786150672,120.322233011,1542704492,10,54.04,238,10","36.075226344,120.314356211,1542704545,10,60.12,228,10","36.072236205,120.312555005,1542704597,10,35.28,142,10","36.0706011296,120.315061175,1542704649,10,11.34,110,10","36.0685378369,120.317775978,1542704701,10,0,98,10","36.0688195042,120.317895497,1542704753,10,0,358,10","36.0706590168,120.317870441,1542704805,10,34.03,354,10","36.0717839252,120.317869634,1542704857,10,7.94,0,10","36.0739165982,120.318617997,1542704909,10,24.01,30,10","36.0780753769,120.321498577,1542704961,10,66.87,54,10","36.0841215243,120.325862295,1542705013,10,50.04,14,10","36.0893503416,120.330558993,1542705065,10,47.92,40,10","36.0949719161,120.336536055,1542705117,10,60.32,58,10","36.0989178008,120.343754977,1542705169,10,57.92,30,10","36.1078891986,120.347114039,1542705221,10,67.56,16,10","36.1132203912,120.341953405,1542705273,10,79.95,312,10","36.1203662082,120.336542141,1542705325,10,64.65,16,10","36.127806772,120.339576583,1542705377,10,69.99,18,10","36.1358413464,120.344054163,1542705429,10,60.89,42,10","36.142723078,120.351475833,1542705481,10,66.79,42,10","36.1504414305,120.357955917,1542705533,10,85.23,30,10","36.159401099,120.36446441,1542705585,10,77.47,30,10","36.1670307349,120.370148187,1542705638,10,75.62,30,10","36.174153068,120.375378597,1542705690,10,55.34,30,10","36.1826116953,120.378258093,1542705742,10,68.14,6,10","36.1913659705,120.377572583,1542705794,10,78.21,346,10","36.2006024054,120.37507592,1542705846,10,61.12,346,10","36.2087023867,120.372944857,1542705897,10,71.34,348,10"]
track:["36.2716924153,120.401133898,1542702871,10,0,182,10","36.2712674153,120.401122046,1542702922,10,0,196,10","36.2711674153,120.401122046,1542702974,10,0,196,10","36.26960681,120.406126,1542703026,10,47.52,130,10","36.2625899159,120.406257629,1542703079,10,55.46,202,10","36.2556959254,120.401709345,1542703131,10,67.12,196,10","36.2484072286,120.398668032,1542703182,10,61.85,210,10","36.2452202208,120.390573255,1542703234,10,65.87,254,10","36.2463943954,120.378697631,1542703287,10,73.71,290,10","36.2466401658,120.368128971,1542703339,10,73.87,260,10","36.2413743783,120.360663512,1542703391,10,59.18,126,10","36.2357637286,120.364107473,1542703443,10,53.34,170,10","36.2272663652,120.366807035,1542703495,10,76.01,162,10","36.2193917852,120.369949698,1542703547,10,54.52,164,10","36.2113422586,120.371949535,1542703599,10,53.63,168,10","36.2033928069,120.374239653,1542703651,10,63.09,166,10","36.1954276423,120.376376162,1542703703,10,64.96,166,10","36.1862905908,120.378671574,1542703756,10,64.74,174,10","36.1787541312,120.377499973,1542703808,10,63.87,188,10","36.1705235657,120.372412643,1542703860,10,72.4,210,10","36.1635141202,120.367268764,1542703914,10,58.26,210,10","36.1567415328,120.362514475,1542703967,10,58.85,212,10","36.151714,120.35796,1542703978,10,58.85,212,10","36.151381,120.3546,1542703985,10,58.85,212,10","36.148601,120.350702,1542703995,10,58.85,212,10","36.145876,120.349642,1542704005,10,58.85,212,10","36.14239,120.348169,1542704020,10,58.85,212,10","36.14239,120.348169,1542704050,10,58.85,212,10","36.1391112024,120.347530639,1542704072,10,81.05,222,10","36.1303655849,120.340345789,1542704124,10,77.4,196,10","36.1213280447,120.336765391,1542704177,10,75.24,196,10","36.11300077,120.341976435,1542704230,10,74.88,130,10","36.1073771898,120.346281534,1542704282,10,66.57,196,10","36.0986517057,120.343359644,1542704334,10,65.1,214,10","36.0932847733,120.33390827,1542704386,10,79.48,222,10","36.0858251826,120.32623366,1542704439,10,58.41,196,10","36.0786150672,120.322233011,1542704492,10,54.04,238,10","36.075226344,120.314356211,1542704545,10,60.12,228,10","36.072236205,120.312555005,1542704597,10,35.28,142,10","36.0706011296,120.315061175,1542704649,10,11.34,110,10","36.0685378369,120.317775978,1542704701,10,0,98,10","36.0688195042,120.317895497,1542704753,10,0,358,10","36.0706590168,120.317870441,1542704805,10,34.03,354,10","36.0717839252,120.317869634,1542704857,10,7.94,0,10","36.0739165982,120.318617997,1542704909,10,24.01,30,10","36.0780753769,120.321498577,1542704961,10,66.87,54,10","36.0841215243,120.325862295,1542705013,10,50.04,14,10","36.0893503416,120.330558993,1542705065,10,47.92,40,10","36.0949719161,120.336536055,1542705117,10,60.32,58,10","36.0989178008,120.343754977,1542705169,10,57.92,30,10","36.1078891986,120.347114039,1542705221,10,67.56,16,10","36.1132203912,120.341953405,1542705273,10,79.95,312,10","36.1203662082,120.336542141,1542705325,10,64.65,16,10","36.127806772,120.339576583,1542705377,10,69.99,18,10","36.1358413464,120.344054163,1542705429,10,60.89,42,10","36.142723078,120.351475833,1542705481,10,66.79,42,10","36.1504414305,120.357955917,1542705533,10,85.23,30,10","36.159401099,120.36446441,1542705585,10,77.47,30,10","36.1670307349,120.370148187,1542705638,10,75.62,30,10","36.174153068,120.375378597,1542705690,10,55.34,30,10","36.1826116953,120.378258093,1542705742,10,68.14,6,10","36.1913659705,120.377572583,1542705794,10,78.21,346,10","36.2006024054,120.37507592,1542705846,10,61.12,346,10","36.2087023867,120.372944857,1542705897,10,71.34,348,10"]
standard_option:need_mapmatch:1|transport_mode:driving|denoise_grade:1|vacuate_grade:1
option:need_mapmatch:1|transport_mode:driving|denoise_grade:1|vacuate_grade:1
coord_type_input:bd09ll
coord_type_output:bd09ll
返回示例
 
{
    "status": 0,
    "message": "OK",
    "data": {
        "similarity": 97.33972803676709,
        "processed_standard_track": [
            {
                "loc": {
                    "longitude": 120.401143542438,
                    "latitude": 36.27159381983164
                },
                "loc_time": 1542702871
            },
            {
                "loc": {
                    "longitude": 120.40113828855124,
                    "latitude": 36.270452489393409
                },
                "loc_time": 1542702922
            },
            ...
        ],
        "processed_track": [
            {
                "loc": {
                    "longitude": 120.4011466648737,
                    "latitude": 36.271693510233969
                },
                "loc_time": 1542702871,
                "unmatched": 1
            },
            {
                "loc": {
                    "longitude": 120.40113828855124,
                    "latitude": 36.270452489393409
                },
                "loc_time": 1542702974
            },
            {
                "loc": {
                    "longitude": 120.40253992118626,
                    "latitude": 36.2704141350664
                },
                "loc_time": 1542702974
            },
            {
                "loc": {
                    "longitude": 120.40295813822128,
                    "latitude": 36.270305669161988
                },
                "loc_time": 1542702974
            },
           ...
        ],
        "standard_track_distance": 46761.142281986984,
        "track_distance": 46955.66684267597,
        "processed_standard_track_distance": 47758.28798339452,
        "processed_track_distance": 47758.28798339452,
        "unmatched_distance": 4301.566201098205,
        "matched_distance": 43456.721782296314
    }
}

使用方法
编码说明

API请求中需要用到中文或一些特殊字符的参数,如query、region等,为了避免提交到后台乱码,需要对这几个参数值进行编码处理,转换成UTF-8字符的二字符十六进制值,凡是不在下表中的字符都需要进行编码。

字符集合 字符
URL非保留字
a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 - _ . ~
URL保留字
 ! * ' ( ) ; : @ & = + $ , / ? % # [ ]

如果中文参数中使用URL保留字字符的字面意思,例如:region关键字取值为"?北京",检索关键字包含一个问号,此问号也必须进行编码。

附注:

.javascript中一般采用encodeURIComponent函数对特殊字符进行编码。

.Java中可以使用函数URLEncoder.encode对特殊字符进行编码。

.C#中可以使用函数HttpUtility.UrlEncode对特殊字符进行编码。

.php中可以使用函数urlencode对特殊字符进行编码。


坐标系说明

.WGS84:为一种大地坐标系,也是目前广泛使用的GPS全球卫星定位系统使用的坐标系。

.GCJ02:是由中国国家测绘局制订的地理信息系统的坐标系统。由WGS84坐标系经加密后的坐标系。

.BD09:为百度坐标系,在GCJ02坐标系基础上再次加密。其中bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托米制坐标

.正/逆地理编码服务默认输入输出坐标类型为百度坐标(BD09),同时可通过参数("coord_type","ret_coordtype")控制输入输出坐标类型。输入坐标支持以上三种坐标系,输出坐标支持-国测局坐标(GCJ02)和百度坐标(BD09)

注意:不同类型坐标如需转换,请使用百度地图开放平台提供的标准坐标转换接口。请勿使用其他渠道提供的坐标转换方法,以免影响坐标转换精度。

服务使用限制

..服务相关配额及并发请求限制请访问开发者权益页面查看。

2019年6月17日

Beta V1.0


产品发布
全新轨迹重合率分析API Beta V1.0产品上线
  • 文档根本没法用

  • 文档水平很差

  • 文档水平一般

  • 文档不错

  • 文档写的很好

如发现文档错误,或对此文档有更好的建议,请在下方反馈。问题咨询请前往反馈平台提交工单咨询。

提交反馈

拖动标注工具

添加矩形标注

添加箭头标注

完成

取消