라벨링 툴 라벨 저장 로직 수정

This commit is contained in:
2026-01-14 17:25:54 +09:00
parent 3bb85b4130
commit adcf8f0a8d
6 changed files with 187 additions and 169 deletions

View File

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