PolygonData -> JsonNode 변환 예제 커밋
This commit is contained in:
@@ -1,5 +1,74 @@
|
||||
package com.kamco.cd.kamcoback.changedetection.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.locationtech.jts.geom.Geometry;
|
||||
|
||||
public record ChangeDetectionDto(Long id, Geometry polygon, double centroidX, double centroidY) {}
|
||||
public class ChangeDetectionDto{
|
||||
|
||||
@Schema(name = "TestDto", description = "테스트용")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class TestDto {
|
||||
private Long id;
|
||||
private Geometry polygon;
|
||||
private Double centroidX;;
|
||||
private Double centroidY;
|
||||
}
|
||||
|
||||
@Schema(name = "PolygonGeometry", description = "폴리곤 리턴 객체")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class PointGeometry{
|
||||
private Long geoUid;
|
||||
private String type; // "Point"
|
||||
private Geometry coordinates; //Point 값
|
||||
private String before_class; //기준 분류
|
||||
private String after_class; //비교 분류
|
||||
}
|
||||
|
||||
@Schema(name = "PolygonGeometry", description = "폴리곤 리턴 객체")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class PolygonGeometry{
|
||||
private Long geoUid;
|
||||
private String type; // "MultiPolygon"
|
||||
private Geometry coordinates; //Polygon 값
|
||||
private Double center_latitude; //폴리곤 중심 위도
|
||||
private Double center_longitude; //폴리곤 중심 경도
|
||||
}
|
||||
|
||||
@Schema(name = "CogURL", description = "COG URL")
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public static class CogURL{
|
||||
private String before_cog_url; //기준 COG URL
|
||||
private String after_cog_url; //비교 COG URL
|
||||
}
|
||||
|
||||
@Schema(name = "PolygonProperties", description = "폴리곤 정보")
|
||||
@Getter
|
||||
@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; //비교 분류
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user