:spotlessApply 실행

This commit is contained in:
2025-11-27 18:13:42 +09:00
parent 8bab44d7e4
commit f74d49f7e1
10 changed files with 211 additions and 161 deletions

View File

@@ -9,12 +9,10 @@ import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.transaction.Transactional;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.util.List;
@Tag(name = "변화탐지", description = "변화탐지 API")
@RequiredArgsConstructor
@RestController
@@ -33,34 +31,37 @@ public class ChangeDetectionApiController {
/**
* PolygonData -> JsonNode 변환 예제
*
* @return
*/
@Hidden
@GetMapping("/json-data")
public ApiResponseDto<List<JsonNode>> getPolygonToJson(){
public ApiResponseDto<List<JsonNode>> getPolygonToJson() {
return ApiResponseDto.ok(changeDetectionService.getPolygonToJson());
}
@Operation(summary = "변화탐지 분류별 건수", description = "변화탐지 분류별 건수")
@GetMapping("/class-count/{id}")
public ApiResponseDto<List<ChangeDetectionDto.CountDto>> getChangeDetectionClassCount(
@Parameter(description = "변화탐지 년도(차수) /year-list 의 analUid", example = "1") @PathVariable Long id){
@Parameter(description = "변화탐지 년도(차수) /year-list 의 analUid", example = "1") @PathVariable
Long id) {
return ApiResponseDto.ok(changeDetectionService.getChangeDetectionClassCount(id));
}
@Operation(summary = "변화탐지 COG Url", description = "변화탐지 COG Url")
@GetMapping("/cog-url")
public ApiResponseDto<ChangeDetectionDto.CogUrlDto> getChangeDetectionCogUrl(
@Parameter(description = "이전 년도", example = "2023") @RequestParam Integer beforeYear,
@Parameter(description = "이후 년도", example = "2024") @RequestParam Integer afterYear,
@Parameter(description = "도엽번호(5k)", example = "36809010") @RequestParam String mapSheetNum){
ChangeDetectionDto.CogUrlReq req = new ChangeDetectionDto.CogUrlReq(beforeYear, afterYear, mapSheetNum);
@Parameter(description = "이전 년도", example = "2023") @RequestParam Integer beforeYear,
@Parameter(description = "이후 년도", example = "2024") @RequestParam Integer afterYear,
@Parameter(description = "도엽번호(5k)", example = "36809010") @RequestParam String mapSheetNum) {
ChangeDetectionDto.CogUrlReq req =
new ChangeDetectionDto.CogUrlReq(beforeYear, afterYear, mapSheetNum);
return ApiResponseDto.ok(changeDetectionService.getChangeDetectionCogUrl(req));
}
@Operation(summary = "변화탐지 년도(차수) 목록", description = "변화탐지 년도(차수) 목록")
@GetMapping("/year-list")
public ApiResponseDto<List<ChangeDetectionDto.AnalYearList>> getChangeDetectionYearList(){
public ApiResponseDto<List<ChangeDetectionDto.AnalYearList>> getChangeDetectionYearList() {
return ApiResponseDto.ok(changeDetectionService.getChangeDetectionYearList());
}
}

View File

@@ -8,7 +8,7 @@ import lombok.NoArgsConstructor;
import lombok.Setter;
import org.locationtech.jts.geom.Geometry;
public class ChangeDetectionDto{
public class ChangeDetectionDto {
@Schema(name = "TestDto", description = "테스트용")
@Getter
@@ -18,7 +18,8 @@ public class ChangeDetectionDto{
public static class TestDto {
private Long id;
private Geometry polygon;
private Double centroidX;;
private Double centroidX;
;
private Double centroidY;
}
@@ -28,9 +29,9 @@ public class ChangeDetectionDto{
@NoArgsConstructor
@AllArgsConstructor
public static class CountDto {
private String classCd; //영문코드
private String className; //한글명
private Long count; //건수
private String classCd; // 영문코드
private String className; // 한글명
private Long count; // 건수
}
@Schema(name = "CogUrlReq", description = "COG Url Req")
@@ -73,12 +74,12 @@ public class ChangeDetectionDto{
@Setter
@NoArgsConstructor
@AllArgsConstructor
public static class PointGeometry{
public static class PointGeometry {
private Long geoUid;
private String type; // "Point"
private Geometry coordinates; //Point 값
private String before_class; //기준 분류
private String after_class; //비교 분류
private String type; // "Point"
private Geometry coordinates; // Point 값
private String before_class; // 기준 분류
private String after_class; // 비교 분류
}
@Schema(name = "PolygonGeometry", description = "폴리곤 리턴 객체")
@@ -86,12 +87,12 @@ public class ChangeDetectionDto{
@Setter
@NoArgsConstructor
@AllArgsConstructor
public static class PolygonGeometry{
public static class PolygonGeometry {
private Long geoUid;
private String type; // "MultiPolygon"
private Geometry coordinates; //Polygon 값
private Double center_latitude; //폴리곤 중심 위도
private Double center_longitude; //폴리곤 중심 경도
private String type; // "MultiPolygon"
private Geometry coordinates; // Polygon 값
private Double center_latitude; // 폴리곤 중심 위도
private Double center_longitude; // 폴리곤 중심 경도
}
@Schema(name = "PolygonProperties", description = "폴리곤 정보")
@@ -99,13 +100,13 @@ public class ChangeDetectionDto{
@Setter
@NoArgsConstructor
@AllArgsConstructor
public static class PolygonProperties{
private Double area; //면적
private String before_year; //기준년도
private Double before_confidence; //기준 신뢰도(확률)
private String before_class; //기준 분류
private String after_year; //비교년도
private Double after_confidence; //비교 신뢰도(확률)
private String after_class; //비교 분류
public static class PolygonProperties {
private Double area; // 면적
private String before_year; // 기준년도
private Double before_confidence; // 기준 신뢰도(확률)
private String before_class; // 기준 분류
private String after_year; // 비교년도
private Double after_confidence; // 비교 신뢰도(확률)
private String after_class; // 비교 분류
}
}