| | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import com.ruoyi.alarm.global.domain.GuidePoint; |
| | | import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell; |
| | | import com.ruoyi.common.constant.CacheConstants; |
| | | import com.ruoyi.common.constant.CameraConstants; |
| | |
| | | @Override |
| | | public TreeMap getNearCamerasBycoordinate(CameraCmd cmd) { |
| | | try { |
| | | double[] targetPosition = cmd.getTargetPosition(); |
| | | if (targetPosition == null || (targetPosition != null && targetPosition.length == 0)) { |
| | | GuidePoint guidePoint = cmd.getTargetPosition(); |
| | | if (guidePoint == null) { |
| | | log.debug("目标位置为空"); |
| | | return new TreeMap<>(); |
| | | } |
| | |
| | | continue; |
| | | } |
| | | double[] camPosition = new double[]{camera.getLongitude(), camera.getLatitude()}; |
| | | double distance = GisUtil.getDistance(cmd.getTargetPosition(), camPosition); |
| | | double[] targetPosition = new double[]{guidePoint.getLongitude(), guidePoint.getLatitude()}; |
| | | double distance = GisUtil.getDistance(targetPosition, camPosition); |
| | | if (camera.getCamMaxVisibleDistance() == null) { |
| | | continue; |
| | | } |