Compare commits
28 Commits
e32f5e33d9
...
4d1ea53d8f
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d1ea53d8f | |||
| 278d5d20e8 | |||
| 4d9fa2d6a5 | |||
| e28e5ba371 | |||
| 22cc996399 | |||
| 060a0db126 | |||
| 2b28241110 | |||
| 972cf808a9 | |||
| c3c194c067 | |||
| 53ce735bca | |||
| 9f6dc2b3c6 | |||
| ca631d5d58 | |||
| 3aed3cf1ec | |||
| a7108c44f4 | |||
| 9cb3a100aa | |||
| 9d36208845 | |||
| 369f303f6c | |||
| f4cbb48aa2 | |||
| 6e4682dad6 | |||
| 5ba7f9ccfc | |||
| fab5b02211 | |||
| a4b1db462b | |||
| a1be4e9faf | |||
| a21df9d018 | |||
| 85cad2dd28 | |||
| 7b8bf8726b | |||
| c841d460aa | |||
| 3a8ac3a24f |
@@ -163,13 +163,13 @@ public class ChangeDetectionApiController {
|
|||||||
@RequestParam
|
@RequestParam
|
||||||
String chnDtctId,
|
String chnDtctId,
|
||||||
@Parameter(description = "polygon 32자 uid", example = "3B1A7E5F895A4D9698489540EE1BBE1E")
|
@Parameter(description = "polygon 32자 uid", example = "3B1A7E5F895A4D9698489540EE1BBE1E")
|
||||||
@RequestParam
|
@RequestParam(required = false)
|
||||||
String cdObjectId,
|
String cdObjectId,
|
||||||
@Parameter(
|
@Parameter(
|
||||||
description = "polygon 32자 uids",
|
description = "polygon 32자 uids",
|
||||||
example =
|
example =
|
||||||
"3B1A7E5F895A4D9698489540EE1BBE1E,3B221A2AF9614647A0903A972D56C574,3B22686A7ACE44FC9CB20F1B4FA6DEFD,3B376D94A183479BB5FBE3D7166E6E1A")
|
"3B1A7E5F895A4D9698489540EE1BBE1E,3B221A2AF9614647A0903A972D56C574,3B22686A7ACE44FC9CB20F1B4FA6DEFD,3B376D94A183479BB5FBE3D7166E6E1A")
|
||||||
@RequestParam
|
@RequestParam(required = false)
|
||||||
List<String> cdObjectIds,
|
List<String> cdObjectIds,
|
||||||
@Parameter(description = "pnu") @RequestParam(required = false) String pnu) {
|
@Parameter(description = "pnu") @RequestParam(required = false) String pnu) {
|
||||||
return ApiResponseDto.ok(
|
return ApiResponseDto.ok(
|
||||||
@@ -183,13 +183,13 @@ public class ChangeDetectionApiController {
|
|||||||
@RequestParam
|
@RequestParam
|
||||||
String chnDtctId,
|
String chnDtctId,
|
||||||
@Parameter(description = "polygon 32자 uid", example = "3B1A7E5F895A4D9698489540EE1BBE1E")
|
@Parameter(description = "polygon 32자 uid", example = "3B1A7E5F895A4D9698489540EE1BBE1E")
|
||||||
@RequestParam
|
@RequestParam(required = false)
|
||||||
String cdObjectId,
|
String cdObjectId,
|
||||||
@Parameter(
|
@Parameter(
|
||||||
description = "polygon 32자 uids",
|
description = "polygon 32자 uids",
|
||||||
example =
|
example =
|
||||||
"3B1A7E5F895A4D9698489540EE1BBE1E,3B221A2AF9614647A0903A972D56C574,3B22686A7ACE44FC9CB20F1B4FA6DEFD,3B376D94A183479BB5FBE3D7166E6E1A")
|
"3B1A7E5F895A4D9698489540EE1BBE1E,3B221A2AF9614647A0903A972D56C574,3B22686A7ACE44FC9CB20F1B4FA6DEFD,3B376D94A183479BB5FBE3D7166E6E1A")
|
||||||
@RequestParam
|
@RequestParam(required = false)
|
||||||
List<String> cdObjectIds,
|
List<String> cdObjectIds,
|
||||||
@Parameter(description = "pnu") @RequestParam(required = false) String pnu) {
|
@Parameter(description = "pnu") @RequestParam(required = false) String pnu) {
|
||||||
return ApiResponseDto.ok(
|
return ApiResponseDto.ok(
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public class ChangeDetectionService {
|
|||||||
*/
|
*/
|
||||||
public ChangeDetectionDto.PolygonFeatureList getPolygonListByCd(
|
public ChangeDetectionDto.PolygonFeatureList getPolygonListByCd(
|
||||||
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu) {
|
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu) {
|
||||||
return changeDetectionCoreService.getPolygonListByCd(chnDtctId, cdObjectId, cdObjectIds);
|
return changeDetectionCoreService.getPolygonListByCd(chnDtctId, cdObjectId, cdObjectIds, pnu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -115,7 +115,7 @@ public class ChangeDetectionService {
|
|||||||
*/
|
*/
|
||||||
public ChangeDetectionDto.PointFeatureList getPointListByCd(
|
public ChangeDetectionDto.PointFeatureList getPointListByCd(
|
||||||
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu) {
|
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu) {
|
||||||
return changeDetectionCoreService.getPointListByCd(chnDtctId, cdObjectId, cdObjectIds);
|
return changeDetectionCoreService.getPointListByCd(chnDtctId, cdObjectId, cdObjectIds, pnu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ import lombok.Getter;
|
|||||||
public enum CrsType implements EnumType {
|
public enum CrsType implements EnumType {
|
||||||
EPSG_3857("Web Mercator, 웹지도 미터(EPSG:900913 동일)"),
|
EPSG_3857("Web Mercator, 웹지도 미터(EPSG:900913 동일)"),
|
||||||
EPSG_4326("WGS84 위경도, GeoJSON/OSM 기본"),
|
EPSG_4326("WGS84 위경도, GeoJSON/OSM 기본"),
|
||||||
EPSG_5186("Korea 2000 중부 TM, 한국 SHP");
|
EPSG_5186("5186::Korea 2000 중부 TM, 한국 SHP"),
|
||||||
|
EPSG_5179("5179::Korea 2000 중부 TM, 한국 SHP");
|
||||||
|
|
||||||
private final String desc;
|
private final String desc;
|
||||||
|
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ public class RestTemplateConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
@Primary
|
@Primary
|
||||||
public RestTemplate restTemplate(RestTemplateBuilder builder) {
|
public RestTemplate restTemplate(RestTemplateBuilder builder) {
|
||||||
return build(builder, 2000, 3000);
|
return build(builder, 20000, 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean("restTemplateLong")
|
@Bean("restTemplateLong")
|
||||||
public RestTemplate restTemplateLong(RestTemplateBuilder builder) {
|
public RestTemplate restTemplateLong(RestTemplateBuilder builder) {
|
||||||
return build(builder, 2000, 60000);
|
return build(builder, 20000, 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private RestTemplate build(RestTemplateBuilder builder, int connectTimeoutMs, int readTimeoutMs) {
|
private RestTemplate build(RestTemplateBuilder builder, int connectTimeoutMs, int readTimeoutMs) {
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class GukYuinApiService {
|
|||||||
@Value("${file.nfs}")
|
@Value("${file.nfs}")
|
||||||
private String nfs;
|
private String nfs;
|
||||||
|
|
||||||
@Value("${file.output-dir}")
|
@Value("${file.output-dir}") // 국유인 반영 파일 경로
|
||||||
private String outputDir;
|
private String outputDir;
|
||||||
|
|
||||||
@Value("${file.dataset-dir}")
|
@Value("${file.dataset-dir}")
|
||||||
|
|||||||
@@ -359,7 +359,12 @@ public class MapSheetMngService {
|
|||||||
|
|
||||||
public FoldersDto getFolderAll(SrchFoldersDto srchDto) {
|
public FoldersDto getFolderAll(SrchFoldersDto srchDto) {
|
||||||
|
|
||||||
String dirPath = syncRootDir + srchDto.getDirPath();
|
// "경로중복"
|
||||||
|
String dirPath =
|
||||||
|
(srchDto.getDirPath() == null || srchDto.getDirPath().isEmpty())
|
||||||
|
? syncRootDir
|
||||||
|
: srchDto.getDirPath();
|
||||||
|
// String dirPath = syncRootDir + srchDto.getDirPath();
|
||||||
|
|
||||||
log.info("[FIND_FOLDER] DIR : {}", dirPath);
|
log.info("[FIND_FOLDER] DIR : {}", dirPath);
|
||||||
List<FIleChecker.Folder> folderList =
|
List<FIleChecker.Folder> folderList =
|
||||||
|
|||||||
@@ -108,8 +108,8 @@ public class ChangeDetectionCoreService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public ChangeDetectionDto.PolygonFeatureList getPolygonListByCd(
|
public ChangeDetectionDto.PolygonFeatureList getPolygonListByCd(
|
||||||
String chnDtctId, String cdObjectId, List<String> cdObjectIds) {
|
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu) {
|
||||||
return changeDetectionRepository.getPolygonListByCd(chnDtctId, cdObjectId, cdObjectIds);
|
return changeDetectionRepository.getPolygonListByCd(chnDtctId, cdObjectId, cdObjectIds, pnu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -121,8 +121,8 @@ public class ChangeDetectionCoreService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public ChangeDetectionDto.PointFeatureList getPointListByCd(
|
public ChangeDetectionDto.PointFeatureList getPointListByCd(
|
||||||
String chnDtctId, String cdObjectId, List<String> cdObjectIds) {
|
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu) {
|
||||||
return changeDetectionRepository.getPointListByCd(chnDtctId, cdObjectId, cdObjectIds);
|
return changeDetectionRepository.getPointListByCd(chnDtctId, cdObjectId, cdObjectIds, pnu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ public interface ChangeDetectionRepositoryCustom {
|
|||||||
List<MapSheetList> getChangeDetectionMapSheet50kList(UUID uuid);
|
List<MapSheetList> getChangeDetectionMapSheet50kList(UUID uuid);
|
||||||
|
|
||||||
ChangeDetectionDto.PolygonFeatureList getPolygonListByCd(
|
ChangeDetectionDto.PolygonFeatureList getPolygonListByCd(
|
||||||
String chnDtctId, String cdObjectId, List<String> cdObjectIds);
|
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu);
|
||||||
|
|
||||||
ChangeDetectionDto.PointFeatureList getPointListByCd(
|
ChangeDetectionDto.PointFeatureList getPointListByCd(
|
||||||
String chnDtctId, String cdObjectId, List<String> cdObjectIds);
|
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu);
|
||||||
|
|
||||||
ChangeDetectionDto.PolygonFeatureList getSelectedChangeDetectionPolygonListByPnu(
|
ChangeDetectionDto.PolygonFeatureList getSelectedChangeDetectionPolygonListByPnu(
|
||||||
String chnDtctId, String pnu);
|
String chnDtctId, String pnu);
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.DetectSearc
|
|||||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapScaleType;
|
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapScaleType;
|
||||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapSheetList;
|
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.MapSheetList;
|
||||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.PointFeatureList;
|
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.PointFeatureList;
|
||||||
|
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.PointQueryData;
|
||||||
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.PolygonFeatureList;
|
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.PolygonFeatureList;
|
||||||
|
import com.kamco.cd.kamcoback.changedetection.dto.ChangeDetectionDto.PolygonQueryData;
|
||||||
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.Status;
|
import com.kamco.cd.kamcoback.inference.dto.InferenceResultDto.Status;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity;
|
||||||
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceEntity;
|
import com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceEntity;
|
||||||
@@ -31,6 +33,7 @@ import com.querydsl.core.types.dsl.CaseBuilder;
|
|||||||
import com.querydsl.core.types.dsl.Expressions;
|
import com.querydsl.core.types.dsl.Expressions;
|
||||||
import com.querydsl.core.types.dsl.StringExpression;
|
import com.querydsl.core.types.dsl.StringExpression;
|
||||||
import com.querydsl.jpa.JPAExpressions;
|
import com.querydsl.jpa.JPAExpressions;
|
||||||
|
import com.querydsl.jpa.impl.JPAQuery;
|
||||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@@ -391,16 +394,23 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PolygonFeatureList getPolygonListByCd(
|
public PolygonFeatureList getPolygonListByCd(
|
||||||
String chnDtctId, String cdObjectId, List<String> cdObjectIds) {
|
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu) {
|
||||||
BooleanBuilder builder = new BooleanBuilder();
|
BooleanBuilder builder = new BooleanBuilder();
|
||||||
builder.and(mapSheetLearnEntity.uid.eq(chnDtctId));
|
builder.and(mapSheetLearnEntity.uid.eq(chnDtctId));
|
||||||
builder.and(
|
|
||||||
mapSheetAnalDataInferenceGeomEntity
|
|
||||||
.resultUid
|
|
||||||
.eq(chnDtctId)
|
|
||||||
.or(mapSheetAnalDataInferenceGeomEntity.resultUid.in(cdObjectIds)));
|
|
||||||
|
|
||||||
List<ChangeDetectionDto.PolygonQueryData> list =
|
// pnu가 들어온 경우
|
||||||
|
boolean hasPnu = pnu != null && !pnu.isBlank();
|
||||||
|
|
||||||
|
if (!hasPnu) {
|
||||||
|
builder.and(
|
||||||
|
mapSheetAnalDataInferenceGeomEntity
|
||||||
|
.resultUid
|
||||||
|
.eq(chnDtctId)
|
||||||
|
.or(mapSheetAnalDataInferenceGeomEntity.resultUid.in(cdObjectIds)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// List<ChangeDetectionDto.PolygonQueryData> list =
|
||||||
|
JPAQuery<PolygonQueryData> query =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
@@ -425,10 +435,22 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.innerJoin(mapSheetAnalInferenceEntity)
|
.innerJoin(mapSheetAnalInferenceEntity)
|
||||||
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
|
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
|
||||||
.innerJoin(mapSheetLearnEntity)
|
.innerJoin(mapSheetLearnEntity)
|
||||||
.on(mapSheetLearnEntity.id.eq(mapSheetAnalInferenceEntity.learnId))
|
.on(mapSheetLearnEntity.id.eq(mapSheetAnalInferenceEntity.learnId));
|
||||||
.where(builder)
|
// .where(builder)
|
||||||
.orderBy(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.asc())
|
// .orderBy(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.asc());
|
||||||
.fetch();
|
// .fetch();
|
||||||
|
|
||||||
|
// 🔥 pnu 조건이면 tb_pnu join 추가
|
||||||
|
if (hasPnu) {
|
||||||
|
query
|
||||||
|
.innerJoin(pnuEntity)
|
||||||
|
.on(pnuEntity.geo.geoUid.eq(mapSheetAnalDataInferenceGeomEntity.geoUid));
|
||||||
|
|
||||||
|
builder.and(pnuEntity.pnu.eq(pnu));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ChangeDetectionDto.PolygonQueryData> list =
|
||||||
|
query.where(builder).orderBy(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.asc()).fetch();
|
||||||
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
List<ChangeDetectionDto.PolygonFeature> result =
|
List<ChangeDetectionDto.PolygonFeature> result =
|
||||||
@@ -470,16 +492,23 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PointFeatureList getPointListByCd(
|
public PointFeatureList getPointListByCd(
|
||||||
String chnDtctId, String cdObjectId, List<String> cdObjectIds) {
|
String chnDtctId, String cdObjectId, List<String> cdObjectIds, String pnu) {
|
||||||
BooleanBuilder builder = new BooleanBuilder();
|
BooleanBuilder builder = new BooleanBuilder();
|
||||||
builder.and(mapSheetLearnEntity.uid.eq(chnDtctId));
|
builder.and(mapSheetLearnEntity.uid.eq(chnDtctId));
|
||||||
builder.and(
|
|
||||||
mapSheetAnalDataInferenceGeomEntity
|
|
||||||
.resultUid
|
|
||||||
.eq(chnDtctId)
|
|
||||||
.or(mapSheetAnalDataInferenceGeomEntity.resultUid.in(cdObjectIds)));
|
|
||||||
|
|
||||||
List<ChangeDetectionDto.PointQueryData> list =
|
// pnu가 들어온 경우
|
||||||
|
boolean hasPnu = pnu != null && !pnu.isBlank();
|
||||||
|
|
||||||
|
if (!hasPnu) {
|
||||||
|
builder.and(
|
||||||
|
mapSheetAnalDataInferenceGeomEntity
|
||||||
|
.resultUid
|
||||||
|
.eq(chnDtctId)
|
||||||
|
.or(mapSheetAnalDataInferenceGeomEntity.resultUid.in(cdObjectIds)));
|
||||||
|
}
|
||||||
|
|
||||||
|
// List<ChangeDetectionDto.PointQueryData> list =
|
||||||
|
JPAQuery<PointQueryData> query =
|
||||||
queryFactory
|
queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
@@ -498,9 +527,21 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
.innerJoin(mapSheetAnalInferenceEntity)
|
.innerJoin(mapSheetAnalInferenceEntity)
|
||||||
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
|
.on(mapSheetAnalInferenceEntity.id.eq(mapSheetAnalDataInferenceEntity.analUid))
|
||||||
.innerJoin(mapSheetLearnEntity)
|
.innerJoin(mapSheetLearnEntity)
|
||||||
.on(mapSheetLearnEntity.id.eq(mapSheetAnalInferenceEntity.learnId))
|
.on(mapSheetLearnEntity.id.eq(mapSheetAnalInferenceEntity.learnId));
|
||||||
.where(builder)
|
// .where(builder)
|
||||||
.fetch();
|
// .fetch();
|
||||||
|
|
||||||
|
// 🔥 pnu 조건이면 tb_pnu join 추가
|
||||||
|
if (hasPnu) {
|
||||||
|
query
|
||||||
|
.innerJoin(pnuEntity)
|
||||||
|
.on(pnuEntity.geo.geoUid.eq(mapSheetAnalDataInferenceGeomEntity.geoUid));
|
||||||
|
|
||||||
|
builder.and(pnuEntity.pnu.eq(pnu));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ChangeDetectionDto.PointQueryData> list =
|
||||||
|
query.where(builder).orderBy(mapSheetAnalDataInferenceGeomEntity.mapSheetNum.asc()).fetch();
|
||||||
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
List<ChangeDetectionDto.PointFeature> result =
|
List<ChangeDetectionDto.PointFeature> result =
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ file:
|
|||||||
nfs: /data
|
nfs: /data
|
||||||
pt-path: ${file.nfs}/ckpt/model/v6-cls-checkpoints/
|
pt-path: ${file.nfs}/ckpt/model/v6-cls-checkpoints/
|
||||||
pt-FileName: yolov8_6th-6m.pt
|
pt-FileName: yolov8_6th-6m.pt
|
||||||
|
output-dir: /kamco-nfs/dataset/export/
|
||||||
|
|
||||||
inference:
|
inference:
|
||||||
nfs: /data
|
nfs: /data
|
||||||
|
|||||||
Reference in New Issue
Block a user