| | |
| | | public static List<PointPO> getRoutePointOrder(List<LotInfo> list, double airportLat, double airportLon) { |
| | | List<Coordinate> centros = new ArrayList<>(); |
| | | List<List<Coordinate>> extremePoints = new ArrayList<>(); |
| | | Map<Coordinate, List<Coordinate>> points = new HashMap<>(); |
| | | AtomicInteger numSize = new AtomicInteger(); |
| | | list.forEach(patche -> { |
| | | |
| | | for (LotInfo patche : list) { |
| | | String wkt = patche.getDkfw(); |
| | | // 解析WKT字符串为多边形 |
| | | WKTReader wktReader = new WKTReader(JTSFactoryFinder.getGeometryFactory()); |
| | |
| | | |
| | | // 开始封装中心点坐标 |
| | | Coordinate coordinateCentro = getCentro(polygon); |
| | | |
| | | double distance = DistanceCalculator.calculateDistance(airportLat, airportLon, coordinateCentro.y,coordinateCentro.x); |
| | | // 机场范围,操作机场范围将不生成 |
| | | if (distance * 1000 > 7000) { |
| | | continue; |
| | | } |
| | | |
| | | centros.add(coordinateCentro); |
| | | |
| | | // 开始封装图斑4个航线 |
| | |
| | | |
| | | // 保存稀释拐点之后总数量 |
| | | numSize.set(numSize.get() + coordinatePointList.size()); |
| | | } |
| | | |
| | | }); |
| | | |
| | | // 开始排序 |
| | | Coordinate[] coordinates = new Coordinate[centros.size() + 1]; |
| | |
| | | retcList.add(PointPO.builder().index(index).coordinate(coordinate).build()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | return retcList; |