geojson 파일 형식 수정
This commit is contained in:
@@ -129,8 +129,8 @@ public class MakeGeoJsonTasklet implements Tasklet {
|
|||||||
|
|
||||||
// Step 2-4: FeatureCollection 생성 및 파일명 결정
|
// Step 2-4: FeatureCollection 생성 및 파일명 결정
|
||||||
log.info(" [2-4] FeatureCollection 생성 중...");
|
log.info(" [2-4] FeatureCollection 생성 중...");
|
||||||
FeatureCollection collection = new FeatureCollection(features);
|
|
||||||
String filename = mapSheet.buildFilename(resultUid);
|
String filename = mapSheet.buildFilename(resultUid);
|
||||||
|
FeatureCollection collection = new FeatureCollection(filename.replace(".geojson", ""), features);
|
||||||
log.info(" [2-4] GeoJSON 파일명: {}", filename);
|
log.info(" [2-4] GeoJSON 파일명: {}", filename);
|
||||||
|
|
||||||
// Step 2-5: 파일 저장 경로 생성
|
// Step 2-5: 파일 저장 경로 생성
|
||||||
|
|||||||
@@ -50,14 +50,31 @@ public class TrainingDataReviewJobDto {
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@JsonPropertyOrder({"type", "features"})
|
public static class Properties {
|
||||||
|
private final String name = "urn:ogc:def:crs:EPSG::5186";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public static class Crs {
|
||||||
|
private final String type = "name";
|
||||||
|
private Properties properties = new Properties();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@JsonPropertyOrder({"type", "name", "crs", "features"})
|
||||||
public static class FeatureCollection {
|
public static class FeatureCollection {
|
||||||
|
|
||||||
private final String type = "FeatureCollection";
|
private final String type = "FeatureCollection";
|
||||||
|
private String name;
|
||||||
|
private Crs crs;
|
||||||
private List<GeoJsonFeature> features;
|
private List<GeoJsonFeature> features;
|
||||||
|
|
||||||
public FeatureCollection(List<GeoJsonFeature> features) {
|
public FeatureCollection(String name, List<GeoJsonFeature> features) {
|
||||||
|
this.name = name;
|
||||||
this.features = features;
|
this.features = features;
|
||||||
|
this.crs = new Crs(); // 기본 CRS 세팅
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class TrainingDataReviewJobRepository {
|
|||||||
SELECT
|
SELECT
|
||||||
mslg.geo_uid,
|
mslg.geo_uid,
|
||||||
'Feature' AS type,
|
'Feature' AS type,
|
||||||
ST_AsGeoJSON(ST_Transform(mslg.geom, 4326)) AS geom_str,
|
ST_AsGeoJSON(mslg.geom) AS geom_str,
|
||||||
CASE
|
CASE
|
||||||
WHEN mslg.class_after_cd IN ('building', 'container') THEN 'M1'
|
WHEN mslg.class_after_cd IN ('building', 'container') THEN 'M1'
|
||||||
WHEN mslg.class_after_cd = 'waste' THEN 'M2'
|
WHEN mslg.class_after_cd = 'waste' THEN 'M2'
|
||||||
|
|||||||
Reference in New Issue
Block a user