feat/infer_dev_260211 #142
@@ -5,7 +5,11 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -173,7 +177,11 @@ public class GeoJsonValidator {
|
||||
// properties가 있고 scene_id가 null이 아니면 텍스트로 읽음
|
||||
// 없으면 null 처리
|
||||
String sceneId =
|
||||
(props != null && props.hasNonNull("scene_id")) ? props.get("scene_id").asText() : null;
|
||||
(props != null && props.hasNonNull("scene_id"))
|
||||
? props.get("scene_id").asText().trim()
|
||||
: null;
|
||||
|
||||
log.info("========== sceneId : {}", sceneId);
|
||||
|
||||
if (sampleIdx < 5) {
|
||||
log.info(
|
||||
@@ -186,6 +194,7 @@ public class GeoJsonValidator {
|
||||
|
||||
// scene_id가 없거나 빈값이면 "정상적으로 도엽번호가 들어오지 않은 feature"로 카운트
|
||||
if (sceneId == null || sceneId.isBlank()) {
|
||||
log.info("========== sceneId 가 없어 continue");
|
||||
nullIdCount++; // 도엽번호가 없으면 증가
|
||||
continue;
|
||||
}
|
||||
@@ -198,6 +207,7 @@ public class GeoJsonValidator {
|
||||
}
|
||||
|
||||
if (!added) {
|
||||
log.info("========== foundUnique add가 안되어 duplicates 에 add");
|
||||
duplicates.add(sceneId);
|
||||
}
|
||||
}
|
||||
@@ -227,17 +237,17 @@ public class GeoJsonValidator {
|
||||
// =========================================================
|
||||
log.info(
|
||||
"""
|
||||
===== GeoJSON Validation =====
|
||||
file: {}
|
||||
features(total): {}
|
||||
requested(unique): {}
|
||||
found(unique scene_id): {}
|
||||
scene_id null/blank: {}
|
||||
duplicates(scene_id): {}
|
||||
missing(requested - found): {}
|
||||
extra(found - requested): {}
|
||||
==============================
|
||||
""",
|
||||
===== GeoJSON Validation =====
|
||||
file: {}
|
||||
features(total): {}
|
||||
requested(unique): {}
|
||||
found(unique scene_id): {}
|
||||
scene_id null/blank: {}
|
||||
duplicates(scene_id): {}
|
||||
missing(requested - found): {}
|
||||
extra(found - requested): {}
|
||||
==============================
|
||||
""",
|
||||
geojsonPath,
|
||||
featureCount, // 중복 포함한 전체 feature 수
|
||||
requested.size(), // 요청 도엽 유니크 수
|
||||
@@ -248,12 +258,17 @@ public class GeoJsonValidator {
|
||||
extra.size()); // 요청하지 않았는데 들어온 도엽 수
|
||||
|
||||
// 중복/누락/추가 항목은 전체를 다 찍으면 로그 폭발하므로 샘플만
|
||||
if (!duplicates.isEmpty())
|
||||
if (!duplicates.isEmpty()) {
|
||||
log.warn("duplicates sample: {}", duplicates.stream().limit(20).toList());
|
||||
}
|
||||
|
||||
if (!missing.isEmpty()) log.warn("missing sample: {}", missing.stream().limit(50).toList());
|
||||
if (!missing.isEmpty()) {
|
||||
log.warn("missing sample: {}", missing.stream().limit(50).toList());
|
||||
}
|
||||
|
||||
if (!extra.isEmpty()) log.warn("extra sample: {}", extra.stream().limit(50).toList());
|
||||
if (!extra.isEmpty()) {
|
||||
log.warn("extra sample: {}", extra.stream().limit(50).toList());
|
||||
}
|
||||
|
||||
// =========================================================
|
||||
// 6) 실패 조건 판정
|
||||
|
||||
Reference in New Issue
Block a user