List<Tuple> 참조 해제 적용하기
This commit is contained in:
@@ -171,6 +171,9 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
||||
ChangeDetectionDto.PolygonFeatureList polygonList = new ChangeDetectionDto.PolygonFeatureList();
|
||||
polygonList.setType("FeatureCollection");
|
||||
polygonList.setFeatures(result);
|
||||
|
||||
list.clear(); // List<Tuple> 사용 참조 해제
|
||||
|
||||
return polygonList;
|
||||
}
|
||||
|
||||
@@ -194,25 +197,30 @@ public class ChangeDetectionRepositoryImpl extends QuerydslRepositorySupport
|
||||
.fetch();
|
||||
|
||||
GeoJsonReader reader = new GeoJsonReader();
|
||||
return list.stream()
|
||||
.map(
|
||||
tuple -> {
|
||||
String geojson = tuple.get(0, String.class);
|
||||
Geometry geom;
|
||||
try {
|
||||
geom = reader.read(geojson);
|
||||
} catch (Exception ex) {
|
||||
throw new RuntimeException("GeoJSON -> Geometry 변환 실패", ex);
|
||||
}
|
||||
List<ChangeDetectionDto.PointFeature> result =
|
||||
list.stream()
|
||||
.map(
|
||||
tuple -> {
|
||||
String geojson = tuple.get(0, String.class);
|
||||
Geometry geom;
|
||||
try {
|
||||
geom = reader.read(geojson);
|
||||
} catch (Exception ex) {
|
||||
throw new RuntimeException("GeoJSON -> Geometry 변환 실패", ex);
|
||||
}
|
||||
|
||||
Long geoUid = tuple.get(mapSheetAnalDataGeomEntity.id).longValue();
|
||||
String classCd =
|
||||
tuple.get(mapSheetAnalDataGeomEntity.classAfterCd.toUpperCase()).toString();
|
||||
Long geoUid = tuple.get(mapSheetAnalDataGeomEntity.id).longValue();
|
||||
String classCd =
|
||||
tuple.get(mapSheetAnalDataGeomEntity.classAfterCd.toUpperCase()).toString();
|
||||
|
||||
return new ChangeDetectionDto.PointFeature(
|
||||
"Feature", geom, new ChangeDetectionDto.PointProperties(geoUid, classCd));
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
return new ChangeDetectionDto.PointFeature(
|
||||
"Feature", geom, new ChangeDetectionDto.PointProperties(geoUid, classCd));
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
list.clear(); // List<Tuple> 사용 참조 해제
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user