src/main/java/com/dji/sample/patches/utils/ShapeFileUtil.java
@@ -22,6 +22,9 @@
import java.io.StringWriter;
import java.util.*;
import static com.dji.sample.patches.utils.TimerUtil.getNowDay;
import static com.dji.sample.patches.utils.TimerUtil.getNowTimeName;
public class ShapeFileUtil {
    //将文件解压
@@ -83,20 +86,43 @@
                byte[] b = temp.getBytes("iso8859-1");
                temp = new String(b, "gbk");
                JSONObject json = JSONObject.parseObject(temp);
                shpDTO.setDKFW(json.getJSONObject("geometry").get("coordinates").toString());
                shpDTO.setGEO(json.getJSONObject("geometry").get("type").toString());
                shpDTO.setXZQDM(json.getJSONObject("properties").get("XZQDM").toString());
            shpDTO.setDKFW(json.getJSONObject("geometry").getString("coordinates"));
            if ((json.getJSONObject("geometry").get("type")) != null) {
                shpDTO.setGEO(json.getJSONObject("geometry").getString("type"));
            }
            if ((json.getJSONObject("properties").get("XZQDM")) != null) {
                shpDTO.setXZQDM(json.getJSONObject("properties").getString("XZQDM"));
            }
            if ((json.getJSONObject("properties").getDouble("XZB")) != null &&
                    json.getJSONObject("properties").getDouble("YZB") != null) {
                double[] xy = getLongitudeLatitude(CoordinateSystemUtil.pointCGCStoWGS(
                                json.getJSONObject("properties").getDouble("XZB"),
                                json.getJSONObject("properties").getDouble("YZB")));
                shpDTO.setXZB(xy[0]);
                shpDTO.setYZB(xy[1]);
            }
            if ((json.getJSONObject("properties").getString("JCBH") != null)) {
                shpDTO.setDKBH(json.getJSONObject("properties").getString("JCBH"));
            }else {
                shpDTO.setDKBH(getNowDay());
            }
            if (json.getJSONObject("properties").getDouble("JCMC") != null) {
                shpDTO.setJCMJ(json.getJSONObject("properties").getDouble("JCMC"));
            }
            if (json.getJSONObject("properties").getString("TBLX") != null) {
                shpDTO.setTBLX(json.getJSONObject("properties").getString("TBLX"));
            }
            if (json.getJSONObject("properties").getString("DDTC") != null) {
                shpDTO.setDDTC(json.getJSONObject("properties").getString("DDTC"));
            }
            if (json.getJSONObject("properties").getString("HSX") != null) {
                shpDTO.setHSX(json.getJSONObject("properties").getString("HSX"));
            }
            if (json.getJSONObject("properties").getString("JCLX") != null) {
                shpDTO.setJCLX(json.getJSONObject("properties").getString("JCLX"));
            }
                dtoList.add(shpDTO);
            }
            iterator.close();