List<Tuple> 참조 해제 적용하기
This commit is contained in:
@@ -146,20 +146,21 @@ public class InferenceResultApiController {
|
||||
}
|
||||
|
||||
// @Operation(summary = "학습모델 결과 처리", description = "실제 학습모델 GeoJSON 파일을 처리하여 데이터베이스에 저장합니다.")
|
||||
// @ApiResponses(
|
||||
// value = {
|
||||
// @ApiResponse(
|
||||
// responseCode = "200",
|
||||
// description = "처리 성공",
|
||||
// content =
|
||||
// @Content(
|
||||
// mediaType = "application/json",
|
||||
// schema =
|
||||
// @Schema(implementation = LearningModelResultDto.ProcessResponse.class))),
|
||||
// @ApiResponse(responseCode = "400", description = "잘못된 요청", content = @Content),
|
||||
// @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
// })
|
||||
// @PostMapping("/learning-model/process")
|
||||
// @ApiResponses(
|
||||
// value = {
|
||||
// @ApiResponse(
|
||||
// responseCode = "200",
|
||||
// description = "처리 성공",
|
||||
// content =
|
||||
// @Content(
|
||||
// mediaType = "application/json",
|
||||
// schema =
|
||||
// @Schema(implementation =
|
||||
// LearningModelResultDto.ProcessResponse.class))),
|
||||
// @ApiResponse(responseCode = "400", description = "잘못된 요청", content = @Content),
|
||||
// @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
// })
|
||||
// @PostMapping("/learning-model/process")
|
||||
public ApiResponseDto<LearningModelResultDto.ProcessResponse> processLearningModelResult(
|
||||
@RequestBody LearningModelResultDto.ProcessRequest request) {
|
||||
try {
|
||||
@@ -197,22 +198,24 @@ public class InferenceResultApiController {
|
||||
}
|
||||
}
|
||||
|
||||
// @Operation(summary = "학습모델 결과 일괄 처리", description = "여러 학습모델 GeoJSON 파일을 일괄 처리하여 데이터베이스에 저장합니다.")
|
||||
// @ApiResponses(
|
||||
// value = {
|
||||
// @ApiResponse(
|
||||
// responseCode = "200",
|
||||
// description = "처리 성공",
|
||||
// content =
|
||||
// @Content(
|
||||
// mediaType = "application/json",
|
||||
// schema =
|
||||
// @Schema(
|
||||
// implementation = LearningModelResultDto.BatchProcessResponse.class))),
|
||||
// @ApiResponse(responseCode = "400", description = "잘못된 요청", content = @Content),
|
||||
// @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
// })
|
||||
// @PostMapping("/learning-model/process-batch")
|
||||
// @Operation(summary = "학습모델 결과 일괄 처리", description = "여러 학습모델 GeoJSON 파일을 일괄 처리하여 데이터베이스에
|
||||
// 저장합니다.")
|
||||
// @ApiResponses(
|
||||
// value = {
|
||||
// @ApiResponse(
|
||||
// responseCode = "200",
|
||||
// description = "처리 성공",
|
||||
// content =
|
||||
// @Content(
|
||||
// mediaType = "application/json",
|
||||
// schema =
|
||||
// @Schema(
|
||||
// implementation =
|
||||
// LearningModelResultDto.BatchProcessResponse.class))),
|
||||
// @ApiResponse(responseCode = "400", description = "잘못된 요청", content = @Content),
|
||||
// @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
// })
|
||||
// @PostMapping("/learning-model/process-batch")
|
||||
public ApiResponseDto<LearningModelResultDto.BatchProcessResponse>
|
||||
processBatchLearningModelResults(
|
||||
@RequestBody LearningModelResultDto.BatchProcessRequest request) {
|
||||
@@ -259,20 +262,21 @@ public class InferenceResultApiController {
|
||||
}
|
||||
|
||||
// @Operation(summary = "기본 학습모델 파일 처리", description = "미리 준비된 학습모델 파일을 처리합니다.")
|
||||
// @ApiResponses(
|
||||
// value = {
|
||||
// @ApiResponse(
|
||||
// responseCode = "200",
|
||||
// description = "처리 성공",
|
||||
// content =
|
||||
// @Content(
|
||||
// mediaType = "application/json",
|
||||
// schema =
|
||||
// @Schema(
|
||||
// implementation = LearningModelResultDto.BatchProcessResponse.class))),
|
||||
// @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
// })
|
||||
// @PostMapping("/learning-model/process-default")
|
||||
// @ApiResponses(
|
||||
// value = {
|
||||
// @ApiResponse(
|
||||
// responseCode = "200",
|
||||
// description = "처리 성공",
|
||||
// content =
|
||||
// @Content(
|
||||
// mediaType = "application/json",
|
||||
// schema =
|
||||
// @Schema(
|
||||
// implementation =
|
||||
// LearningModelResultDto.BatchProcessResponse.class))),
|
||||
// @ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
// })
|
||||
// @PostMapping("/learning-model/process-default")
|
||||
public ApiResponseDto<LearningModelResultDto.BatchProcessResponse>
|
||||
processDefaultLearningModelResults() {
|
||||
try {
|
||||
|
||||
@@ -171,6 +171,9 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
||||
ChangeDetectionDto.PolygonFeatureList polygonList = new ChangeDetectionDto.PolygonFeatureList();
|
||||
polygonList.setType("FeatureCollection");
|
||||
polygonList.setFeatures(result);
|
||||
|
||||
list.clear(); // List<Tuple> 사용 참조 해제
|
||||
|
||||
return polygonList;
|
||||
}
|
||||
|
||||
@@ -194,7 +197,8 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
||||
.fetch();
|
||||
|
||||
GeoJsonReader reader = new GeoJsonReader();
|
||||
return list.stream()
|
||||
List<ChangeDetectionDto.PointFeature> result =
|
||||
list.stream()
|
||||
.map(
|
||||
tuple -> {
|
||||
String geojson = tuple.get(0, String.class);
|
||||
@@ -213,6 +217,10 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
||||
"Feature", geom, new ChangeDetectionDto.PointProperties(geoUid, classCd));
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
list.clear(); // List<Tuple> 사용 참조 해제
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user