Map<Long, List<AdLane>> roadLanesMap = adLanesGroup.stream()
.collect(Collectors.groupingBy(AdLane::getROAD_ID));
Coordinate[] leftCoordinates = rDivGeom.getCoordinates();
Coordinate[] rightCoordinates = lDivGeom.getCoordinates();
Coordinate[] coordinates = new Coordinate[leftCoordinates.length + rightCoordinates.length + 1];
System.arraycopy(leftCoordinates, 0, coordinates, 0, leftCoordinates.length);
System.arraycopy(rightCoordinates, 0, coordinates, leftCoordinates.length, rightCoordinates.length);
System.arraycopy(leftCoordinates, 0, coordinates, leftCoordinates.length + rightCoordinates.length, 1);
Polygon polygon = GeoUtils.polygonFromCoordinates(coordinates);
polygons.add(polygon);
网友评论