Sign inSign up

hao474798383/point-thin

By hao474798383

•Updated about 2 years ago

Image
0

301

hao474798383/point-thin repository overview

⁠轨迹点压缩服务

⁠压缩比测试报告

测试样本使用真实设备数据, 每份样本为该设备类型全天上报的地理位置信息合集

压缩算法级别默认为 L2, 既保证了压缩后数据上图后的保真度, 也达到了数据压缩的目的

序号设备类型样本数平均值(点位)标准差最大值最小值L1L2L3L4L5压缩比(L2)
1x11043351208653222478765763432261627.5 : 1
2x2528392453754442417110961402526 : 1
3x35100937017136427316314583392581.5 : 1
4x4529542206599716328018895522516 : 1

⁠API

接口地址请求方法参数名说明类型是否必填
/point-thin/zipPOSTpoints轨迹点位集合arrays[ json or arrays ]是
---------------(application/json)level压缩等级(1-9)int是
get_lng获取精度 jsonpath (默认 $.lng OR $.[0])str否
get_lat获取纬度 jsonpath (默认 $.lat OR $.[0])str否
ret_tpl返回值模版, 默认返回入参格式报文str否

⁠示例

{
    "_id": "66ecdf6438e647480d35413e",
    "data": {
        "classify_code": "xxxxx",
        "feature": {
            "geometry": {
                "coordinates": [111, 22],
                "type": "Point"
            },
            "type": "Feature",
            "properties": ""
        },
        "device_code": "xxxxx",
        "is_online": true,
        "org_name": "xxxxx",
        "org_code": "xxxxx"
    },
    "data.gps_time": "2024-09-20 10:35:21"
}

上述数据是点位集合里的一个元素, 那么上送报文如下:

{
      "level": 2,
      "get_lng": "$.data.feature.geometry.coordinates[0]",
      "get_lat": "$.data.feature.geometry.coordinates[1]",
      "points": ["点位集合"]
    }

返回报文格式如下:

{
  "code": 200,
  "message": "成功",
  "data": ["压缩后的点位集合"]
}

Tag summary

Content type

Image

Digest

sha256:5434c1f86…

Size

71.6 MB

Last updated

about 2 years ago

docker pull hao474798383/point-thin