[KC-103] 추론 실행 파일명 변경
This commit is contained in:
@@ -176,12 +176,18 @@ public class InferenceResultService {
|
||||
// 비교년도 geojson 파일 생성하여 경로 받기
|
||||
String modelComparePath =
|
||||
getSceneInference(
|
||||
String.valueOf(req.getCompareYyyy()), mapSheetNumList, req.getMapSheetScope());
|
||||
String.valueOf(req.getCompareYyyy()),
|
||||
mapSheetNumList,
|
||||
req.getMapSheetScope(),
|
||||
req.getDetectOption());
|
||||
|
||||
// 기준년도 geojson 파일 생성하여 경로 받기
|
||||
String modelTargetPath =
|
||||
getSceneInference(
|
||||
String.valueOf(req.getTargetYyyy()), mapSheetNumList, req.getMapSheetScope());
|
||||
String.valueOf(req.getTargetYyyy()),
|
||||
mapSheetNumList,
|
||||
req.getMapSheetScope(),
|
||||
req.getDetectOption());
|
||||
|
||||
// ai 서버에 전달할 파라미터 생성
|
||||
pred_requests_areas predRequestsAreas = new pred_requests_areas();
|
||||
@@ -391,8 +397,10 @@ public class InferenceResultService {
|
||||
* @param mapSheetScope EXCL : 추론제외, PREV 이전 년도 도엽 사용
|
||||
* @return
|
||||
*/
|
||||
private String getSceneInference(String yyyy, List<String> mapSheetNums, String mapSheetScope) {
|
||||
return mapSheetMngCoreService.getSceneInference(yyyy, mapSheetNums, mapSheetScope);
|
||||
private String getSceneInference(
|
||||
String yyyy, List<String> mapSheetNums, String mapSheetScope, String detectOption) {
|
||||
return mapSheetMngCoreService.getSceneInference(
|
||||
yyyy, mapSheetNums, mapSheetScope, detectOption);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.kamco.cd.kamcoback.common.exception.CustomApiException;
|
||||
import com.kamco.cd.kamcoback.common.geometry.GeoJsonFileWriter;
|
||||
import com.kamco.cd.kamcoback.common.geometry.GeoJsonFileWriter.ImageFeature;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.DetectOption;
|
||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.MapSheetScope;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto;
|
||||
import com.kamco.cd.kamcoback.mapsheet.dto.MapSheetMngDto.MngListCompareDto;
|
||||
@@ -219,18 +220,26 @@ public class MapSheetMngCoreService {
|
||||
* @param mapSheetScope EXCL : 추론제외, PREV 이전 년도 도엽 사용
|
||||
* @return
|
||||
*/
|
||||
public String getSceneInference(String yyyy, List<String> scenes, String mapSheetScope) {
|
||||
public String getSceneInference(
|
||||
String yyyy, List<String> scenes, String mapSheetScope, String detectOption) {
|
||||
|
||||
boolean isAll = MapSheetScope.ALL.getId().equals(mapSheetScope);
|
||||
|
||||
String optionSuffix = "";
|
||||
if (DetectOption.EXCL.getId().equals(detectOption)) {
|
||||
optionSuffix = "_EXCL";
|
||||
} else if (DetectOption.PREV.getId().equals(detectOption)) {
|
||||
optionSuffix = "_PREV";
|
||||
}
|
||||
|
||||
// 1) 경로/파일명 결정
|
||||
String targetDir =
|
||||
"local".equals(activeEnv) ? System.getProperty("user.home") + "/geojson" : inferenceDir;
|
||||
|
||||
String filename =
|
||||
isAll
|
||||
? String.format("%s_%s_ALL.geojson", yyyy, activeEnv)
|
||||
: String.format("%s_%s.geojson", yyyy, activeEnv);
|
||||
? String.format("%s_%s_ALL%s.geojson", yyyy, activeEnv, optionSuffix)
|
||||
: String.format("%s_%s%s.geojson", yyyy, activeEnv, optionSuffix);
|
||||
|
||||
Path outputPath = Paths.get(targetDir, filename);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user