4 Commits

Author SHA1 Message Date
28718c4218 Merge pull request 'feat/infer_dev_260107' (#5) from feat/infer_dev_260107 into develop
Reviewed-on: #5
2026-01-29 14:42:55 +09:00
480b016f33 geoserver url 변경 2026-01-29 14:42:21 +09:00
8563204e59 영상관리 folder-list 수정 2026-01-29 12:49:16 +09:00
e31913ff9a cls model 적용 2026-01-29 12:31:52 +09:00
5 changed files with 28 additions and 20 deletions

View File

@@ -30,12 +30,14 @@ import java.util.stream.Stream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FilenameUtils;
import org.geotools.coverage.grid.GridCoverage2D;
import org.geotools.gce.geotiff.GeoTiffReader;
import org.springframework.util.FileSystemUtils;
import org.springframework.web.multipart.MultipartFile;
@Slf4j
public class FIleChecker {
static SimpleDateFormat dttmFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -138,7 +140,9 @@ public class FIleChecker {
// null을 넣으면 전체 영역을 읽지 않고 메타데이터 위주로 체크하여 빠름
GridCoverage2D coverage = reader.read(null);
if (coverage == null) return false;
if (coverage == null) {
return false;
}
// 3. GIS 필수 정보(좌표계)가 있는지 확인
// if (coverage.getCoordinateReferenceSystem() == null) {
@@ -152,7 +156,9 @@ public class FIleChecker {
return false;
} finally {
// 리소스 해제 (필수)
if (reader != null) reader.dispose();
if (reader != null) {
reader.dispose();
}
}
}
@@ -296,7 +302,8 @@ public class FIleChecker {
boolean isValid =
!NameValidator.containsKorean(folderNm)
&& !NameValidator.containsWhitespaceRegex(folderNm);
&& !NameValidator.containsWhitespaceRegex(folderNm)
&& !parentFolderNm.equals("kamco-nfs");
File file = new File(fullPath);
int childCnt = getChildFolderCount(file);
@@ -586,7 +593,9 @@ public class FIleChecker {
}
public static boolean checkExtensions(String fileName, String ext) {
if (fileName == null) return false;
if (fileName == null) {
return false;
}
if (!fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase().equals(ext)) {
return false;
@@ -690,6 +699,7 @@ public class FIleChecker {
@Schema(name = "Folder", description = "폴더 정보")
@Getter
public static class Folder {
private final String folderNm;
private final String parentFolderNm;
private final String parentPath;

View File

@@ -341,12 +341,14 @@ public class MapSheetMngService {
String dirPath = syncRootDir + srchDto.getDirPath();
String sortType = "name desc";
List<FIleChecker.Folder> folderList = FIleChecker.getFolderAll(dirPath);
List<FIleChecker.Folder> folderList =
FIleChecker.getFolderAll(dirPath).stream()
.filter(dir -> dir.getIsValid().equals(true))
.toList();
int folderTotCnt = folderList.size();
int folderErrTotCnt =
(int)
folderList.stream().filter(dto -> dto.getIsValid().toString().equals("false")).count();
(int) folderList.stream().filter(dto -> dto.getIsValid().equals(false)).count();
return new FoldersDto(dirPath, folderTotCnt, folderErrTotCnt, folderList);
}

View File

@@ -243,8 +243,6 @@ public class ModelMngService {
List<Basic> files =
FIleChecker.getFilesFromAllDepth(dirPath, "*", "pth,py,json", 10, "name", startPos, endPos);
boolean hasPt = false; // pt 파일 존재 여부
for (Basic dto : files) {
// 예: 파일명 출력 및 추가 작업
String foldNm = dto.getFullPath().replace(dto.getFileNm(), "");
@@ -265,8 +263,7 @@ public class ModelMngService {
}
}
if (!hasPt) {
// cls model 적용
String defaultPath = ptPath;
String defaultFileName = ptFileName;
@@ -276,7 +273,6 @@ public class ModelMngService {
modelUploadResDto.setClsModelPath(defaultPath);
modelUploadResDto.setClsModelFileName(defaultFileName);
}
}
// int fileListPos = 0;
// int fileTotCnt = files.size();

View File

@@ -123,5 +123,5 @@ training-data:
geojson-dir: /kamco-nfs/model_output/labeling/
layer:
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
geoserver-url: https://label-tile.gs.dabeeo.com
workspace: cd

View File

@@ -78,5 +78,5 @@ training-data:
geojson-dir: /kamco-nfs/model_output/labeling/
layer:
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
geoserver-url: https://label-tile.gs.dabeeo.com
workspace: cd