|
|
|
@ -27,12 +27,23 @@ import org.locationtech.proj4j.BasicCoordinateTransform;
|
|
|
|
|
import org.locationtech.proj4j.CRSFactory; |
|
|
|
|
import org.locationtech.proj4j.CoordinateReferenceSystem; |
|
|
|
|
import org.locationtech.proj4j.ProjCoordinate; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
|
|
|
|
|
|
@Log4j2 |
|
|
|
|
@Component |
|
|
|
|
public class FlightUtils { |
|
|
|
|
//기본좌표를 받아 버퍼좌표를 생성하는 유틸
|
|
|
|
|
|
|
|
|
|
private static String basePath; |
|
|
|
|
|
|
|
|
|
@Value("${url.base.coord}") |
|
|
|
|
public void setPath(String value) { |
|
|
|
|
basePath = value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Coordinate[] createBuffer(Coordinate[] lineCoords, Integer bufval) { |
|
|
|
|
GeometryFactory geometryFactory = new GeometryFactory(); |
|
|
|
|
LineString line = new GeometryFactory().createLineString(lineCoords); |
|
|
|
@ -149,12 +160,12 @@ public class FlightUtils {
|
|
|
|
|
|
|
|
|
|
public static JSONObject getCoordinateGis(Coordinate coordinate) throws IOException, ParseException { |
|
|
|
|
|
|
|
|
|
String path = "C:\\Users\\Jaewoo\\Downloads\\pal\\pav\\kac\\coordinate\\CoordinateFolder\\"; |
|
|
|
|
|
|
|
|
|
String baseFileName = "all_location.geojson"; |
|
|
|
|
|
|
|
|
|
JSONObject obj = new JSONObject(); |
|
|
|
|
|
|
|
|
|
String path = basePath; |
|
|
|
|
|
|
|
|
|
while(true) { |
|
|
|
|
|
|
|
|
|
File file = new File(path+baseFileName); |
|
|
|
|