feiyu02
2025-07-16 8fc27dba6719041402e3e3c099e2f3e01d9d52c7
src/main/kotlin/com/flightfeather/uav/biz/dataprocess/RoadSegment.kt
@@ -50,6 +50,7 @@
        // 通过高德API查询坐标对应的路段
        val segmentInfoList = mutableListOf<SegmentInfo>()
        gdGPS.forEachIndexed { i, pair ->
            Thread.sleep(400)
            val address = AMapService.reGeo(pair)
            segmentInfoList.add(SegmentInfo().apply {
                missionCode = mission.missionCode
@@ -96,7 +97,7 @@
    private fun saveResult(segmentInfoList:List<SegmentInfo>) {
        val res = mutableListOf<SegmentInfo>()
        segmentInfoList.forEach { s ->
            // 判断当前记录和上个记录是否数据同一条道路
            // 判断当前记录和上个记录是否属于同一条道路
            if (res.isNotEmpty()) {
                val lastOne = res.last()
                // 若属于同一道路,合并