Merge pull request 'feat/infer_dev_260107' (#233) from feat/infer_dev_260107 into develop

Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/233
This commit is contained in:
2026-01-14 17:41:24 +09:00
7 changed files with 327 additions and 309 deletions

View File

@@ -4,7 +4,7 @@ import com.kamco.cd.kamcoback.postgres.repository.trainingdata.TrainingDataLabel
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DefaultPaging; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DefaultPaging;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DetailRes; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DetailRes;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.GeoFeatureRequest.Properties; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelFeatureRequest.LabelProperties;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingGeometryInfo; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingGeometryInfo;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingListDto; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingListDto;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.SummaryRes; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.SummaryRes;
@@ -42,7 +42,7 @@ public class TrainingDataLabelCoreService {
} }
public void updateLabelingPolygonClass( public void updateLabelingPolygonClass(
Long inferenceGeomUid, Geometry geometry, Properties properties, String status) { Long inferenceGeomUid, Geometry geometry, LabelProperties properties, String status) {
trainingDataLabelRepository.updateLabelingPolygonClass( trainingDataLabelRepository.updateLabelingPolygonClass(
inferenceGeomUid, geometry, properties, status); inferenceGeomUid, geometry, properties, status);
} }

View File

@@ -3,7 +3,7 @@ package com.kamco.cd.kamcoback.postgres.repository.trainingdata;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DefaultPaging; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DefaultPaging;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DetailRes; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DetailRes;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.GeoFeatureRequest.Properties; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelFeatureRequest.LabelProperties;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingGeometryInfo; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingGeometryInfo;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingListDto; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingListDto;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.SummaryRes; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.SummaryRes;
@@ -25,7 +25,7 @@ public interface TrainingDataLabelRepositoryCustom {
void updateLabelingSkipState(Long inferenceGeomUid, String status); void updateLabelingSkipState(Long inferenceGeomUid, String status);
void updateLabelingPolygonClass( void updateLabelingPolygonClass(
Long inferenceGeomUid, Geometry geometry, Properties properties, String status); Long inferenceGeomUid, Geometry geometry, LabelProperties properties, String status);
SummaryRes getSummary(String userId); SummaryRes getSummary(String userId);

View File

@@ -11,15 +11,16 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelState; import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelState;
import com.kamco.cd.kamcoback.postgres.entity.LabelingAssignmentEntity; import com.kamco.cd.kamcoback.postgres.entity.LabelingAssignmentEntity;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity; import com.kamco.cd.kamcoback.postgres.entity.MapSheetAnalDataInferenceGeomEntity;
import com.kamco.cd.kamcoback.postgres.entity.MapSheetLearnDataGeomEntity;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.ChangeDetectionInfo; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.ChangeDetectionInfo;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.ClassificationInfo; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.ClassificationInfo;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DefaultPaging; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DefaultPaging;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DetailRes; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DetailRes;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.GeoFeatureRequest.Properties;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.InferenceDataGeometry; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.InferenceDataGeometry;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.InferenceDataGeometry.InferenceProperties; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.InferenceDataGeometry.InferenceProperties;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.InspectionResultInfo; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.InspectionResultInfo;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelFeatureRequest.LabelProperties;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingGeometryInfo; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingGeometryInfo;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingListDto; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingListDto;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LearnDataGeometry; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LearnDataGeometry;
@@ -204,7 +205,7 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
@Override @Override
public void updateLabelingPolygonClass( public void updateLabelingPolygonClass(
Long inferenceGeomUid, Geometry geometry, Properties properties, String status) { Long inferenceGeomUid, Geometry geometry, LabelProperties properties, String status) {
// inference_geom 테이블에 상태 업데이트 // inference_geom 테이블에 상태 업데이트
queryFactory queryFactory
.update(mapSheetAnalDataInferenceGeomEntity) .update(mapSheetAnalDataInferenceGeomEntity)
@@ -225,28 +226,45 @@ public class TrainingDataLabelRepositoryImpl extends QuerydslRepositorySupport
"MapSheetAnalDataInferenceGeomEntity not found for analUid: "); "MapSheetAnalDataInferenceGeomEntity not found for analUid: ");
} }
// learn_data_geom 에 insert MapSheetLearnDataGeomEntity learnEntity =
queryFactory queryFactory
.insert(mapSheetLearnDataGeomEntity) .selectFrom(mapSheetLearnDataGeomEntity)
.columns( .where(mapSheetLearnDataGeomEntity.geoUid.eq(inferenceGeomUid))
mapSheetLearnDataGeomEntity.geoUid, .fetchOne();
mapSheetLearnDataGeomEntity.afterYyyy,
mapSheetLearnDataGeomEntity.beforeYyyy, if (Objects.isNull(learnEntity)) {
mapSheetLearnDataGeomEntity.classAfterCd, // learn_data_geom 에 insert
mapSheetLearnDataGeomEntity.classBeforeCd, queryFactory
mapSheetLearnDataGeomEntity.geom, .insert(mapSheetLearnDataGeomEntity)
mapSheetLearnDataGeomEntity.createdDate, .columns(
mapSheetLearnDataGeomEntity.modifiedDate) mapSheetLearnDataGeomEntity.geoUid,
.values( mapSheetLearnDataGeomEntity.afterYyyy,
inferenceGeomUid, mapSheetLearnDataGeomEntity.beforeYyyy,
entity.getTargetYyyy(), mapSheetLearnDataGeomEntity.classAfterCd,
entity.getCompareYyyy(), mapSheetLearnDataGeomEntity.classBeforeCd,
properties.getAfterClass().toLowerCase(), mapSheetLearnDataGeomEntity.geom,
properties.getBeforeClass().toLowerCase(), mapSheetLearnDataGeomEntity.createdDate,
geometry, mapSheetLearnDataGeomEntity.modifiedDate)
ZonedDateTime.now(), .values(
ZonedDateTime.now()) inferenceGeomUid,
.execute(); entity.getTargetYyyy(),
entity.getCompareYyyy(),
properties.getAfterClass().toLowerCase(),
properties.getBeforeClass().toLowerCase(),
geometry,
ZonedDateTime.now(),
ZonedDateTime.now())
.execute();
} else {
queryFactory
.update(mapSheetLearnDataGeomEntity)
.set(mapSheetLearnDataGeomEntity.geom, geometry)
.set(mapSheetLearnDataGeomEntity.classAfterCd, properties.getAfterClass().toLowerCase())
.set(mapSheetLearnDataGeomEntity.classBeforeCd, properties.getBeforeClass().toLowerCase())
.set(mapSheetLearnDataGeomEntity.modifiedDate, ZonedDateTime.now())
.where(mapSheetLearnDataGeomEntity.geoUid.eq(inferenceGeomUid))
.execute();
}
} }
@Override @Override

View File

@@ -89,7 +89,7 @@ public class TrainingDataLabelApiController {
}) })
@PostMapping @PostMapping
public ApiResponseDto<ResponseObj> saveLabelingFeature( public ApiResponseDto<ResponseObj> saveLabelingFeature(
@RequestBody TrainingDataLabelDto.GeoFeatureRequest request) { @RequestBody TrainingDataLabelDto.LabelFeatureRequest request) {
return ApiResponseDto.okObject(trainingDataLabelService.saveLabelingFeature(request)); return ApiResponseDto.okObject(trainingDataLabelService.saveLabelingFeature(request));
} }
@@ -150,147 +150,147 @@ public class TrainingDataLabelApiController {
description = "1개의 polygon이 저장된 경우 응답 예시", description = "1개의 polygon이 저장된 경우 응답 예시",
value = value =
""" """
{ {
"code": "OK", "code": "OK",
"message": null, "message": null,
"data": { "data": {
"assignmentUid": "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02", "assignmentUid": "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02",
"changeDetectionInfo": { "changeDetectionInfo": {
"mapSheetInfo": "NI52-3-13-1", "mapSheetInfo": "NI52-3-13-1",
"detectionYear": "2023-2024", "detectionYear": "2023-2024",
"beforeClass": { "beforeClass": {
"classification": "waste", "classification": "waste",
"probability": 0.95 "probability": 0.95
}, },
"afterClass": { "afterClass": {
"classification": "land", "classification": "land",
"probability": 0.98 "probability": 0.98
}, },
"area": 1250.5, "area": 1250.5,
"detectionAccuracy": 0.96, "detectionAccuracy": 0.96,
"pnu": 1234567890 "pnu": 1234567890
}, },
"inspectionResultInfo": { "inspectionResultInfo": {
"verificationResult": "완료", "verificationResult": "완료",
"inappropriateReason": "" "inappropriateReason": ""
}, },
"geom": { "geom": {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]] "coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]]
}, },
"properties": { "properties": {
"beforeClass": "waste", "beforeClass": "waste",
"afterClass": "land" "afterClass": "land"
} }
}, },
"beforeCogUrl": "https://storage.example.com/cog/2023/NI52-3-13-1.tif", "beforeCogUrl": "https://storage.example.com/cog/2023/NI52-3-13-1.tif",
"afterCogUrl": "https://storage.example.com/cog/2024/NI52-3-13-1.tif", "afterCogUrl": "https://storage.example.com/cog/2024/NI52-3-13-1.tif",
"mapBox": { "mapBox": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.65, 34.58], [126.67, 34.58], [126.67, 34.60], [126.65, 34.60], [126.65, 34.58]]] "coordinates": [[[126.65, 34.58], [126.67, 34.58], [126.67, 34.60], [126.65, 34.60], [126.65, 34.58]]]
}, },
"learnGeometries": [ "learnGeometries": [
{ {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]] "coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]]
}, },
"properties": { "properties": {
"beforeClass": "waste", "beforeClass": "waste",
"afterClass": "land" "afterClass": "land"
}
}
]
}
} }
"""), }
]
}
}
"""),
@io.swagger.v3.oas.annotations.media.ExampleObject( @io.swagger.v3.oas.annotations.media.ExampleObject(
name = "여러 polygon 조회", name = "여러 polygon 조회",
description = "3개의 polygon이 저장된 경우 응답 예시", description = "3개의 polygon이 저장된 경우 응답 예시",
value = value =
""" """
{ {
"code": "OK", "code": "OK",
"message": null, "message": null,
"data": { "data": {
"assignmentUid": "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02", "assignmentUid": "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02",
"changeDetectionInfo": { "changeDetectionInfo": {
"mapSheetInfo": "NI52-3-13-1", "mapSheetInfo": "NI52-3-13-1",
"detectionYear": "2023-2024", "detectionYear": "2023-2024",
"beforeClass": { "beforeClass": {
"classification": "waste", "classification": "waste",
"probability": 0.95 "probability": 0.95
}, },
"afterClass": { "afterClass": {
"classification": "land", "classification": "land",
"probability": 0.98 "probability": 0.98
}, },
"area": 1250.5, "area": 1250.5,
"detectionAccuracy": 0.96, "detectionAccuracy": 0.96,
"pnu": 1234567890 "pnu": 1234567890
}, },
"inspectionResultInfo": { "inspectionResultInfo": {
"verificationResult": "완료", "verificationResult": "완료",
"inappropriateReason": "" "inappropriateReason": ""
}, },
"geom": { "geom": {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]] "coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]]
}, },
"properties": { "properties": {
"beforeClass": "waste", "beforeClass": "waste",
"afterClass": "land" "afterClass": "land"
} }
}, },
"beforeCogUrl": "https://storage.example.com/cog/2023/NI52-3-13-1.tif", "beforeCogUrl": "https://storage.example.com/cog/2023/NI52-3-13-1.tif",
"afterCogUrl": "https://storage.example.com/cog/2024/NI52-3-13-1.tif", "afterCogUrl": "https://storage.example.com/cog/2024/NI52-3-13-1.tif",
"mapBox": { "mapBox": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.65, 34.58], [126.67, 34.58], [126.67, 34.60], [126.65, 34.60], [126.65, 34.58]]] "coordinates": [[[126.65, 34.58], [126.67, 34.58], [126.67, 34.60], [126.65, 34.60], [126.65, 34.58]]]
}, },
"learnGeometries": [ "learnGeometries": [
{ {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]] "coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]]
}, },
"properties": { "properties": {
"beforeClass": "waste", "beforeClass": "waste",
"afterClass": "land" "afterClass": "land"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[126.665, 34.585], [126.664, 34.584], [126.666, 34.586], [126.665, 34.585]]]
},
"properties": {
"beforeClass": "forest",
"afterClass": "building"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[126.660, 34.590], [126.659, 34.589], [126.661, 34.591], [126.660, 34.590]]]
},
"properties": {
"beforeClass": "grassland",
"afterClass": "concrete"
}
}
]
}
} }
""") },
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[126.665, 34.585], [126.664, 34.584], [126.666, 34.586], [126.665, 34.585]]]
},
"properties": {
"beforeClass": "forest",
"afterClass": "building"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[126.660, 34.590], [126.659, 34.589], [126.661, 34.591], [126.660, 34.590]]]
},
"properties": {
"beforeClass": "grassland",
"afterClass": "concrete"
}
}
]
}
}
""")
})), })),
@ApiResponse(responseCode = "400", description = "잘못된 요청", content = @Content), @ApiResponse(responseCode = "400", description = "잘못된 요청", content = @Content),
@ApiResponse(responseCode = "404", description = "데이터를 찾을 수 없음", content = @Content), @ApiResponse(responseCode = "404", description = "데이터를 찾을 수 없음", content = @Content),

View File

@@ -49,7 +49,7 @@ public class TrainingDataReviewApiController {
public ApiResponseDto<Page<ReviewListDto>> findReviewAssignedList( public ApiResponseDto<Page<ReviewListDto>> findReviewAssignedList(
@RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "0") int page,
@RequestParam(defaultValue = "20") int size, @RequestParam(defaultValue = "20") int size,
@RequestParam(defaultValue = "01022223333") String userId) { @RequestParam(defaultValue = "K20251212001") String userId) {
TrainingDataReviewDto.searchReq searchReq = new TrainingDataReviewDto.searchReq(page, size, ""); TrainingDataReviewDto.searchReq searchReq = new TrainingDataReviewDto.searchReq(page, size, "");
return ApiResponseDto.ok(trainingDataReviewService.findReviewAssignedList(searchReq, userId)); return ApiResponseDto.ok(trainingDataReviewService.findReviewAssignedList(searchReq, userId));
} }
@@ -111,7 +111,7 @@ public class TrainingDataReviewApiController {
@io.swagger.v3.oas.annotations.Parameter( @io.swagger.v3.oas.annotations.Parameter(
description = "검수자 사번", description = "검수자 사번",
required = true, required = true,
example = "01022223333") example = "K20251212001")
@RequestParam @RequestParam
String userId) { String userId) {
try { try {
@@ -150,147 +150,147 @@ public class TrainingDataReviewApiController {
description = "1개의 polygon이 저장된 경우 응답 예시", description = "1개의 polygon이 저장된 경우 응답 예시",
value = value =
""" """
{ {
"code": "OK", "code": "OK",
"message": null, "message": null,
"data": { "data": {
"operatorUid": "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02", "operatorUid": "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02",
"changeDetectionInfo": { "changeDetectionInfo": {
"mapSheetInfo": "NI52-3-13-1", "mapSheetInfo": "NI52-3-13-1",
"detectionYear": "2023-2024", "detectionYear": "2023-2024",
"beforeClass": { "beforeClass": {
"classification": "waste", "classification": "waste",
"probability": 0.95 "probability": 0.95
}, },
"afterClass": { "afterClass": {
"classification": "land", "classification": "land",
"probability": 0.98 "probability": 0.98
}, },
"area": 1250.5, "area": 1250.5,
"detectionAccuracy": 0.96, "detectionAccuracy": 0.96,
"pnu": 1234567890 "pnu": 1234567890
}, },
"inspectionResultInfo": { "inspectionResultInfo": {
"verificationResult": "완료", "verificationResult": "완료",
"inappropriateReason": "" "inappropriateReason": ""
}, },
"geom": { "geom": {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]] "coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]]
}, },
"properties": { "properties": {
"beforeClass": "waste", "beforeClass": "waste",
"afterClass": "land" "afterClass": "land"
} }
}, },
"beforeCogUrl": "https://storage.example.com/cog/2023/NI52-3-13-1.tif", "beforeCogUrl": "https://storage.example.com/cog/2023/NI52-3-13-1.tif",
"afterCogUrl": "https://storage.example.com/cog/2024/NI52-3-13-1.tif", "afterCogUrl": "https://storage.example.com/cog/2024/NI52-3-13-1.tif",
"mapBox": { "mapBox": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.65, 34.58], [126.67, 34.58], [126.67, 34.60], [126.65, 34.60], [126.65, 34.58]]] "coordinates": [[[126.65, 34.58], [126.67, 34.58], [126.67, 34.60], [126.65, 34.60], [126.65, 34.58]]]
}, },
"learnGeometries": [ "learnGeometries": [
{ {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]] "coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]]
}, },
"properties": { "properties": {
"beforeClass": "waste", "beforeClass": "waste",
"afterClass": "land" "afterClass": "land"
}
}
]
}
} }
"""), }
]
}
}
"""),
@io.swagger.v3.oas.annotations.media.ExampleObject( @io.swagger.v3.oas.annotations.media.ExampleObject(
name = "여러 polygon 조회", name = "여러 polygon 조회",
description = "3개의 polygon이 저장된 경우 응답 예시", description = "3개의 polygon이 저장된 경우 응답 예시",
value = value =
""" """
{ {
"code": "OK", "code": "OK",
"message": null, "message": null,
"data": { "data": {
"operatorUid": "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02", "operatorUid": "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02",
"changeDetectionInfo": { "changeDetectionInfo": {
"mapSheetInfo": "NI52-3-13-1", "mapSheetInfo": "NI52-3-13-1",
"detectionYear": "2023-2024", "detectionYear": "2023-2024",
"beforeClass": { "beforeClass": {
"classification": "waste", "classification": "waste",
"probability": 0.95 "probability": 0.95
}, },
"afterClass": { "afterClass": {
"classification": "land", "classification": "land",
"probability": 0.98 "probability": 0.98
}, },
"area": 1250.5, "area": 1250.5,
"detectionAccuracy": 0.96, "detectionAccuracy": 0.96,
"pnu": 1234567890 "pnu": 1234567890
}, },
"inspectionResultInfo": { "inspectionResultInfo": {
"verificationResult": "완료", "verificationResult": "완료",
"inappropriateReason": "" "inappropriateReason": ""
}, },
"geom": { "geom": {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]] "coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]]
}, },
"properties": { "properties": {
"beforeClass": "waste", "beforeClass": "waste",
"afterClass": "land" "afterClass": "land"
} }
}, },
"beforeCogUrl": "https://storage.example.com/cog/2023/NI52-3-13-1.tif", "beforeCogUrl": "https://storage.example.com/cog/2023/NI52-3-13-1.tif",
"afterCogUrl": "https://storage.example.com/cog/2024/NI52-3-13-1.tif", "afterCogUrl": "https://storage.example.com/cog/2024/NI52-3-13-1.tif",
"mapBox": { "mapBox": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.65, 34.58], [126.67, 34.58], [126.67, 34.60], [126.65, 34.60], [126.65, 34.58]]] "coordinates": [[[126.65, 34.58], [126.67, 34.58], [126.67, 34.60], [126.65, 34.60], [126.65, 34.58]]]
}, },
"learnGeometries": [ "learnGeometries": [
{ {
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Polygon", "type": "Polygon",
"coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]] "coordinates": [[[126.663, 34.588], [126.662, 34.587], [126.664, 34.589], [126.663, 34.588]]]
}, },
"properties": { "properties": {
"beforeClass": "waste", "beforeClass": "waste",
"afterClass": "land" "afterClass": "land"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[126.665, 34.585], [126.664, 34.584], [126.666, 34.586], [126.665, 34.585]]]
},
"properties": {
"beforeClass": "forest",
"afterClass": "building"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[126.660, 34.590], [126.659, 34.589], [126.661, 34.591], [126.660, 34.590]]]
},
"properties": {
"beforeClass": "grassland",
"afterClass": "concrete"
}
}
]
}
} }
""") },
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[126.665, 34.585], [126.664, 34.584], [126.666, 34.586], [126.665, 34.585]]]
},
"properties": {
"beforeClass": "forest",
"afterClass": "building"
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[126.660, 34.590], [126.659, 34.589], [126.661, 34.591], [126.660, 34.590]]]
},
"properties": {
"beforeClass": "grassland",
"afterClass": "concrete"
}
}
]
}
}
""")
})), })),
@ApiResponse(responseCode = "400", description = "잘못된 요청", content = @Content), @ApiResponse(responseCode = "400", description = "잘못된 요청", content = @Content),
@ApiResponse(responseCode = "404", description = "데이터를 찾을 수 없음", content = @Content), @ApiResponse(responseCode = "404", description = "데이터를 찾을 수 없음", content = @Content),
@@ -301,8 +301,8 @@ public class TrainingDataReviewApiController {
@io.swagger.v3.oas.annotations.Parameter( @io.swagger.v3.oas.annotations.Parameter(
description = "검수 작업 ID (UUID)", description = "검수 작업 ID (UUID)",
required = true, required = true,
example = "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02") example = "da9d026c-a67a-4d2d-a05a-6cc924372795")
@RequestParam(defaultValue = "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02") @RequestParam(defaultValue = "da9d026c-a67a-4d2d-a05a-6cc924372795")
java.util.UUID operatorUid) { java.util.UUID operatorUid) {
return ApiResponseDto.ok(trainingDataReviewService.getDetail(operatorUid)); return ApiResponseDto.ok(trainingDataReviewService.getDetail(operatorUid));
} }
@@ -323,10 +323,10 @@ public class TrainingDataReviewApiController {
}) })
@GetMapping("/default-page") @GetMapping("/default-page")
public ApiResponseDto<TrainingDataReviewDto.DefaultPaging> getDefaultPagingNumber( public ApiResponseDto<TrainingDataReviewDto.DefaultPaging> getDefaultPagingNumber(
@Parameter(description = "사번", example = "01022223333") @RequestParam String userId, @Parameter(description = "사번", example = "K20251212001") @RequestParam String userId,
@Parameter(description = "페이징 사이즈", example = "20") @RequestParam(defaultValue = "20") @Parameter(description = "페이징 사이즈", example = "20") @RequestParam(defaultValue = "20")
Integer size, Integer size,
@Parameter(description = "개별 UUID", example = "79bcdbbe-6ed4-4caa-b4a4-22f3cf2f9d25") @Parameter(description = "개별 UUID", example = "da9d026c-a67a-4d2d-a05a-6cc924372795")
@RequestParam(required = false) @RequestParam(required = false)
String operatorUid) { String operatorUid) {
return ApiResponseDto.ok( return ApiResponseDto.ok(

View File

@@ -96,12 +96,12 @@ public class TrainingDataLabelDto {
} }
} }
@Schema(name = "GeoFeatureRequest", description = "polygon 저장") @Schema(name = "LabelFeatureRequest", description = "polygon 저장")
@Getter @Getter
@Setter @Setter
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public static class GeoFeatureRequest { public static class LabelFeatureRequest {
@Schema(description = "assignmentUid", example = "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02") @Schema(description = "assignmentUid", example = "4f9ebc8b-6635-4177-b42f-7efc9c7b4c02")
private String assignmentUid; private String assignmentUid;
@@ -148,10 +148,10 @@ public class TrainingDataLabelDto {
""") """)
private Geometry geometry; private Geometry geometry;
private Properties properties; private LabelProperties properties;
@Getter @Getter
public static class Properties { public static class LabelProperties {
@Schema(description = "beforeClass", example = "WASTE") @Schema(description = "beforeClass", example = "WASTE")
private String beforeClass; private String beforeClass;

View File

@@ -6,7 +6,7 @@ import com.kamco.cd.kamcoback.postgres.core.TrainingDataLabelCoreService;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DefaultPaging; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DefaultPaging;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DetailRes; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.DetailRes;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.GeoFeatureRequest; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelFeatureRequest;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingGeometryInfo; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingGeometryInfo;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingListDto; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.LabelingListDto;
import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.SummaryRes; import com.kamco.cd.kamcoback.trainingdata.dto.TrainingDataLabelDto.SummaryRes;
@@ -36,7 +36,7 @@ public class TrainingDataLabelService {
} }
@Transactional @Transactional
public ResponseObj saveLabelingFeature(GeoFeatureRequest request) { public ResponseObj saveLabelingFeature(LabelFeatureRequest request) {
String status = ""; String status = "";
String assignmentUid = request.getAssignmentUid(); String assignmentUid = request.getAssignmentUid();
Long inferenceGeomUid = Long inferenceGeomUid =