| | |
| | | |
| | | } |
| | | |
| | | // ArrayList<List<String>> lists = new ArrayList<>(); |
| | | |
| | | HashMap<String,List<String>> rsMap = new HashMap<>(); |
| | | // HashMap<String,List<Map<String,Object>>> rsMap1 = new HashMap<>(); |
| | | for (UAVGteForDTO uavGteForDTO : list) { |
| | | ArrayList<String> list1 = new ArrayList<>(); |
| | | ArrayList<String[]> doubleArrayList = new ArrayList<>(); |
| | |
| | | doubleArrayList.add(uavGteForDTO.getRightTop()); |
| | | doubleArrayList.add(uavGteForDTO.getRightBottom()); |
| | | //获取区域对象 |
| | | for (HistorySecondUav historySecondUav : historySecondUavs) { |
| | | for (int i = 0; i < historySecondUavs.size(); i++) { |
| | | HistorySecondUav historySecondUav = historySecondUavs.get(i); |
| | | String value = historySecondUav.getValue(); |
| | | Map map1 = JSON.parseObject(value, Map.class); |
| | | String flylat = map1.get("flylat").toString(); |
| | |
| | | //判断点是否在区域内 |
| | | boolean flag = isInPolygon(flylon,flylat,doubleArrayList); |
| | | if (flag){ |
| | | |
| | | list1.add(historySecondUav.getValue()); |
| | | list1.add(historySecondUav.getValue()); |
| | | historySecondUavs.remove(i); |
| | | } |
| | | } |
| | | // lists.add(list1); |
| | | //获取中心点坐标 |
| | | String result = getResult(doubleArrayList); |
| | | rsMap.put(result,list1); |
| | | } |
| | | } |
| | | // for (HistorySecondUav historySecondUav : historySecondUavs) { |
| | | // String value = historySecondUav.getValue(); |
| | | // Map map1 = JSON.parseObject(value, Map.class); |
| | | // String flylat = map1.get("flylat").toString(); |
| | | // String flylon = map1.get("flylon").toString(); |
| | | // //判断点是否在区域内 |
| | | // boolean flag = isInPolygon(flylon,flylat,doubleArrayList); |
| | | // if (flag){ |
| | | // historySecondUavs.remove(historySecondUav); |
| | | // list1.add(historySecondUav.getValue()); |
| | | // } |
| | | // } |
| | | // //获取中心点坐标 |
| | | // String result = getResult(doubleArrayList); |
| | | // rsMap.put(result,list1); |
| | | // } |
| | | |
| | | //计算区域类所有因子的平均数 |
| | | ArrayList<UAVResultDTO> uavResultDTOS = new ArrayList<>(); |