| | |
| | | windLevelCondition?.let { sourceTrace(historyData, exceptionData, config, it) } |
| | | } |
| | | |
| | | // 所属街镇 |
| | | var township:String? = null |
| | | // 格式化地址 |
| | | var address: String? = null |
| | | // 所在道路名称 |
| | | var street:String? = null |
| | | // 所在道路上的最近门牌号 |
| | | var streetNumber:String? = null |
| | | // 处于该门牌号的方向 |
| | | var direction:String? = null |
| | | // 处于该门牌号的方向距离 |
| | | var distance: String? = null |
| | | // 所处最近交叉路口的方向和距离 |
| | | var roadinter:String? = null |
| | | // 所处最近交叉路口的距离 |
| | | var distance2: String? = null |
| | | |
| | | // 污染范围扇形区域(经纬度多边形) |
| | | var polygon: List<Pair<Double, Double>>? = null |
| | |
| | | val pair = avgData.longitude!!.toDouble() to avgData.latitude!!.toDouble() |
| | | |
| | | polygon = calSector( |
| | | avgData.windDirection!!.toDouble(), |
| | | avgData.windDirection?.toDouble() ?: .0, |
| | | pair, |
| | | windLevelCondition.distanceType.disRange, |
| | | config.sourceTraceDegOffset |
| | |
| | | if (config.isSearchAddress) { |
| | | try { |
| | | val address = AMapService.reGeo(MapUtil.wgs84ToGcj02(pair)) |
| | | this.address = address.district + address.township + address.street |
| | | // Thread.sleep(100) |
| | | this.township = address.province + address.district + address.township |
| | | this.address = address.address |
| | | this.street = address.street |
| | | this.streetNumber = address.streetNumber |
| | | this.direction = address.direction |
| | | this.distance = address.distance |
| | | this.roadinter = address.roadinter |
| | | this.distance2 = address.distance2 |
| | | Thread.sleep(100) |
| | | } catch (e: Exception) { |
| | | e.printStackTrace() |
| | | } |