| | |
| | | @Override |
| | | public TreeMap getNearCamerasBycoordinate(CameraCmd cmd) { |
| | | try { |
| | | GuidePoint guidePoint = cmd.getTargetPosition(); |
| | | if (guidePoint == null) { |
| | | double[] targetPosition = cmd.getTargetPosition(); |
| | | if (targetPosition == null) { |
| | | log.debug("目标位置为空"); |
| | | return new TreeMap<>(); |
| | | } |
| | |
| | | continue; |
| | | } |
| | | double[] camPosition = new double[]{camera.getLongitude(), camera.getLatitude()}; |
| | | double[] targetPosition = new double[]{guidePoint.getLongitude(), guidePoint.getLatitude()}; |
| | | double distance = GisUtil.getDistance(targetPosition, camPosition); |
| | | if (camera.getCamMaxVisibleDistance() == null) { |
| | | continue; |