| | |
| | | //获取Polygon的中心点,X轴和Y轴 |
| | | public static String getCentros(List<LotInfo> list) { |
| | | List<Coordinate> centros = new ArrayList<>(); |
| | | List<List<Coordinate>> extremePoints = new ArrayList<>(); |
| | | Map<Coordinate, List<Coordinate>> points = new HashMap<>(); |
| | | list.forEach(patche -> { |
| | | String wkt = patche.getDkfw(); |
| | | // 解析WKT字符串为多边形 |
| | |
| | | Coordinate coordinateCentro = getCentro(polygon); |
| | | centros.add(coordinateCentro); |
| | | str = coordinateCentro.toString(); |
| | | // 开始封装图斑4个航线 |
| | | List<Coordinate> coordinatePointList = getExtremePoints(polygon); |
| | | extremePoints.add(coordinatePointList); |
| | | points.put(coordinateCentro, coordinatePointList); |
| | | |
| | | }); |
| | | return str; |
| | | } |