Browse Source

좌표로 법정동코드 찾기(beta)

pull/12/head
박재우 11 months ago
parent
commit
ffeeb96663
  1. 17
      pav-server/src/main/java/com/palnet/comn/utils/FlightUtils.java

17
pav-server/src/main/java/com/palnet/comn/utils/FlightUtils.java

@ -1,6 +1,7 @@
package com.palnet.comn.utils; package com.palnet.comn.utils;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;
@ -156,21 +157,14 @@ public class FlightUtils {
while(true) { while(true) {
try { File file = new File(path+baseFileName);
obj = parseGeoJson(path+baseFileName, coordinate); if(!file.exists()) return obj;
path += obj.get("CD")+"\\"; obj = parseGeoJson(path+baseFileName, coordinate);
System.out.println(obj.toString()); path += obj.get("CD")+"\\";
}catch(Exception e) {
log.error("error>>>> : {}" , e);
return obj;
}
} }
} }
@ -188,6 +182,7 @@ public class FlightUtils {
Point point = geometryFactory.createPoint(coordinate); Point point = geometryFactory.createPoint(coordinate);
String type = (String) jsonObject.get("type"); String type = (String) jsonObject.get("type");
Object airArea = jsonObject; Object airArea = jsonObject;
List<JSONObject> features = (List<JSONObject>) jsonObject.get("features"); List<JSONObject> features = (List<JSONObject>) jsonObject.get("features");
fileInputStream.close(); fileInputStream.close();

Loading…
Cancel
Save