feiyu02
2025-09-30 94fee0b511279679b43e210878d3d36e5a14384b
src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/model/PollutedArea.kt
@@ -63,7 +63,7 @@
        val pair = avgData.longitude!!.toDouble() to avgData.latitude!!.toDouble()
        polygon = calSector(
            avgData.windDirection!!.toDouble(),
            avgData.windDirection?.toDouble() ?: .0,
            pair,
            windLevelCondition.distanceType.disRange,
            config.sourceTraceDegOffset
@@ -72,13 +72,19 @@
            MapUtil.wgs84ToGcj02(it)
        }
        closePolygon = closeSourceTrace(historyData, pair)
        closePolygon = closeSourceTrace(historyData, pair).map {
            // 将坐标转换为gcj02(火星坐标系),因为污染源场景信息都为此坐标系
            MapUtil.wgs84ToGcj02(it)
        }
        try {
            val address = AMapService.reGeo(pair)
            this.address = address.district + address.township + address.street
        } catch (e: Exception) {
            e.printStackTrace()
        if (config.isSearchAddress) {
            try {
                val address = AMapService.reGeo(MapUtil.wgs84ToGcj02(pair))
                this.address = address.district + address.township + address.street
//                Thread.sleep(100)
            } catch (e: Exception) {
                e.printStackTrace()
            }
        }
    }