Browse Source

feat: 드론원스톱 목록 조회시 요청반경에 의한 반원 전송

pull/19/head
지대한 1 month ago
parent
commit
a9b54c9e50
  1. 2
      pav-server/src/main/java/com/palnet/biz/api/bas/dos/model/BasDosPlanAreaRs.java
  2. 10
      pav-server/src/main/java/com/palnet/biz/api/bas/dos/service/BasDosService.java

2
pav-server/src/main/java/com/palnet/biz/api/bas/dos/model/BasDosPlanAreaRs.java

@ -71,4 +71,6 @@ public class BasDosPlanAreaRs {
private String approvalCd; private String approvalCd;
// buffer // buffer
private List<Map<String, Double>> bufferCoordList; private List<Map<String, Double>> bufferCoordList;
// req buffer
private List<Map<String, Double>> reqBufferCoordList;
} }

10
pav-server/src/main/java/com/palnet/biz/api/bas/dos/service/BasDosService.java

@ -158,6 +158,7 @@ public class BasDosService {
if (cptAuthCode != null) { if (cptAuthCode != null) {
Coordinate centerPoint = new Coordinate(area.getLon(), area.getLat()); Coordinate centerPoint = new Coordinate(area.getLon(), area.getLat());
if ("DF0002".equals(cptAuthCode)) { if ("DF0002".equals(cptAuthCode)) {
// 검토신청한 건에 대해서
// 관제과(9.3km) // 관제과(9.3km)
AirspaceUtils airspaceUtils = AirspaceUtils.getInstance(); AirspaceUtils airspaceUtils = AirspaceUtils.getInstance();
List<AirspaceUtils.FeatureInfo> airspaces = airspaceUtils.getAirspaces(AirspaceUtils.AirspaceType.GIMPO); List<AirspaceUtils.FeatureInfo> airspaces = airspaceUtils.getAirspaces(AirspaceUtils.AirspaceType.GIMPO);
@ -183,9 +184,9 @@ public class BasDosService {
} }
List<Map<String, Double>> bufferCoordList = null; List<Map<String, Double>> bufferCoordList = null;
List<Map<String, Double>> reqBufferCoordList = null;
if (type == PlanSelectType.LIST) { if (type == PlanSelectType.LIST) {
List<Coordinate> coordBuffers = areaUtils.createCircle(new Coordinate(area.getLon(), area.getLat()), area.getBufferZone()); List<Coordinate> coordBuffers = areaUtils.createCircle(new Coordinate(area.getLon(), area.getLat()), area.getBufferZone());
if ("GIMPO".equalsIgnoreCase(rq.getSelectZone())) { if ("GIMPO".equalsIgnoreCase(rq.getSelectZone())) {
AirspaceUtils airspaceUtils = AirspaceUtils.getInstance(); AirspaceUtils airspaceUtils = AirspaceUtils.getInstance();
Geometry rqGeometry = airspaceUtils.createGeometryByCoordinate(coordBuffers); Geometry rqGeometry = airspaceUtils.createGeometryByCoordinate(coordBuffers);
@ -201,6 +202,12 @@ public class BasDosService {
} }
} }
bufferCoordList = coordBuffers.stream().map(coord -> Map.of("lat", coord.y, "lon", coord.x)).collect(Collectors.toList()); bufferCoordList = coordBuffers.stream().map(coord -> Map.of("lat", coord.y, "lon", coord.x)).collect(Collectors.toList());
if(area.getReqRadius() != null && area.getReqRadius() > 0) {
List<Coordinate> reqCoordBuffers = areaUtils.createCircle(new Coordinate(area.getLon(), area.getLat()), area.getReqRadius());
reqBufferCoordList = reqCoordBuffers.stream().map(coord -> Map.of("lat", coord.y, "lon", coord.x)).collect(Collectors.toList());
}
} }
// TODO 추후 Utils 생성 // TODO 추후 Utils 생성
@ -266,6 +273,7 @@ public class BasDosService {
.limitZoneCd(area.getLimitZone()) .limitZoneCd(area.getLimitZone())
.limitZoneNm(limitZoneType != null ? limitZoneType.getMessage() : null) .limitZoneNm(limitZoneType != null ? limitZoneType.getMessage() : null)
.bufferCoordList(bufferCoordList) .bufferCoordList(bufferCoordList)
.reqBufferCoordList(reqBufferCoordList)
.build(); .build();
areaRsList.add(areaRs); areaRsList.add(areaRs);
} }

Loading…
Cancel
Save