From 024e90554d19c2342f27a26f91bbea378f84da82 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 13 十一月 2024 17:25:18 +0800
Subject: [PATCH] 1

---
 src/main/java/com/moon/server/helper/GdbHelper.java |   88 -------------------------------------------
 1 files changed, 1 insertions(+), 87 deletions(-)

diff --git a/src/main/java/com/moon/server/helper/GdbHelper.java b/src/main/java/com/moon/server/helper/GdbHelper.java
index 002809c..c037585 100644
--- a/src/main/java/com/moon/server/helper/GdbHelper.java
+++ b/src/main/java/com/moon/server/helper/GdbHelper.java
@@ -20,16 +20,10 @@
 import java.time.LocalTime;
 import java.util.*;
 
-/**
- * GDB甯姪绫�
- * @author WWW
- */
+@SuppressWarnings("ALL")
 public class GdbHelper {
     private final static Log log = LogFactory.getLog(GdbHelper.class);
 
-    /**
-     * 閿�姣佽祫婧�
-     */
     public static void delete(Layer layer) {
         try {
             if (null != layer) {
@@ -40,9 +34,6 @@
         }
     }
 
-    /**
-     * 閿�姣佽祫婧�
-     */
     public static void delete(DataSource dataSource, Driver driver) {
         try {
             if (null != dataSource) {
@@ -61,17 +52,11 @@
         }
     }
 
-    /**
-     * 閿�姣佽祫婧�
-     */
     public static void delete(Layer layer, DataSource dataSource, Driver driver) {
         delete(layer);
         delete(dataSource, driver);
     }
 
-    /**
-     * 鑾峰彇琛ㄥ悕
-     */
     public static List<String> getTabNames(String filePath) {
         List<String> list = new ArrayList<>();
 
@@ -106,9 +91,6 @@
         return list;
     }
 
-    /**
-     * 璇诲彇鏁版嵁
-     */
     public static <T> List<T> readData(Class clazz, String filePath, String layerName, boolean isTransform) {
         List<T> list = new ArrayList<>();
 
@@ -144,9 +126,6 @@
         return list;
     }
 
-    /**
-     * 璇诲彇鍥惧眰
-     */
     public static <T> void readLayer(Class clazz, Layer layer, List<T> list, boolean isTransform) {
         try {
             Field gField = getGeomField(clazz);
@@ -176,9 +155,6 @@
         }
     }
 
-    /**
-     * 鑾峰彇鍧愭爣杞崲鍣�
-     */
     private static CoordinateTransformation getCoordinateTransformation(Layer layer, boolean isTransform) {
         if (!isTransform) {
             return null;
@@ -203,9 +179,6 @@
         return CoordinateTransformation.CreateCoordinateTransformation(layer.GetSpatialRef(), srTarget);
     }
 
-    /**
-     * 鑾峰彇 geom 瀛楁
-     */
     private static Field getGeomField(Class clazz) {
         try {
             Field gField = clazz.getSuperclass().getDeclaredField("geom");
@@ -217,9 +190,6 @@
         }
     }
 
-    /**
-     * 鑾峰彇瀛楁鏄犲皠
-     */
     private static void getFieldMapper(Class clazz, Layer layer, Map<Integer, Field> map) {
         try {
             FeatureDefn fd = layer.GetLayerDefn();
@@ -247,9 +217,6 @@
         }
     }
 
-    /**
-     * 璇诲彇Feature
-     */
     private static <T> void readFeature(T t, Feature f, Map<Integer, Field> map, Field gField, CoordinateTransformation ct) {
         for (Integer i : map.keySet()) {
             try {
@@ -265,9 +232,6 @@
         }
     }
 
-    /**
-     * 璁剧疆鍊�
-     */
     public static <T> void setValue(T t, Feature f, Field field, Integer i) throws Exception {
         switch (field.getType().getName()) {
             case "java.math.BigDecimal":
@@ -304,20 +268,6 @@
         }
     }
 
-    /**
-     * 璁剧疆 geom 瀛楁鍊�
-     * <p>
-     * wkbUnknown = 0,
-     * wkbPoint = 1,
-     * wkbLineString = 2,
-     * wkbPolygon = 3,
-     * wkbMultiPoint = 4,
-     * wkbMultiLineString = 5,
-     * wkbMultiPolygon = 6,
-     * wkbGeometryCollection = 7,
-     * wkbNone = 100,
-     * wkbLinearRing = 101
-     */
     private static <T> void setGeom(T t, Field gField, Geometry geometry, CoordinateTransformation ct) {
         try {
             if (null == geometry) {
@@ -349,9 +299,6 @@
         }
     }
 
-    /**
-     * 鑾峰彇 Timestamp
-     */
     public static Timestamp getTimestamp(Feature f, int index) {
         int[] pnYear = new int[1];
         int[] pnMonth = new int[1];
@@ -379,9 +326,6 @@
         return Timestamp.valueOf(localDateTime);
     }
 
-    /**
-     * 鑾峰彇 LocalDate
-     */
     public static LocalDate getLocalDate(Feature f, int index) {
         int[] pnYear = new int[1];
         int[] pnMonth = new int[1];
@@ -399,9 +343,6 @@
         return LocalDate.of(pnYear[0], pnMonth[0], pnDay[0]);
     }
 
-    /**
-     * 鍒涘缓GDB
-     */
     public static void createGdb(String filePath,  Map<String, List<?>> map) throws Exception {
         Driver driver = null;
         DataSource dataSource = null;
@@ -457,9 +398,6 @@
         }
     }
 
-    /**
-     * 鍒涘缓鍥惧眰
-     */
     private static Layer createLayer(DataSource dataSource, BasicMapper baseMapper ) {
         String tab = BaseQueryService.getTabName(baseMapper);
         if (StringHelper.isNull(tab)) {
@@ -487,9 +425,6 @@
         return dataSource.CreateLayer(tab.replace(".", "_"), sr, getGeomType(geomType), null);
     }
 
-    /**
-     * 鑾峰彇Geom绫诲埆
-     */
     private static Integer getGeomType(String geomType) {
         if (StringHelper.isEmpty(geomType)) {
             return ogr.wkbPoint;
@@ -513,9 +448,6 @@
         }
     }
 
-    /**
-     * 鑾峰彇瀛楁
-     */
     public static void getFields(Class clazz, List<Field> list, List<String> excludeFields) {
         try {
             Field[] fields = clazz.getDeclaredFields();
@@ -536,9 +468,6 @@
         }
     }
 
-    /**
-     * 娣诲姞鍥惧眰瀛楁
-     */
     public static void addLayerField(Layer layer, List<Field> list) {
         for (int i = 0, c = list.size(); i < c; i++) {
             Field f = list.get(i);
@@ -550,9 +479,6 @@
         }
     }
 
-    /**
-     * 鑾峰彇瀛楁绫诲瀷
-     */
     private static Integer getFieldType(Field f) {
         switch (f.getType().getName()) {
             case "java.math.BigDecimal":
@@ -574,9 +500,6 @@
         }
     }
 
-    /**
-     * 璁剧疆鍥惧眰鏁版嵁
-     */
     private static <T> void setLayerData(Layer layer,  List<Field> fields, List<T> list) throws Exception {
         for (T t : list) {
             Feature f = new Feature(layer.GetLayerDefn());
@@ -594,9 +517,6 @@
         }
     }
 
-    /**
-     * 璁剧疆瑕佺礌鐨勬暟鎹�
-     */
     public static <T> void setFeatureData(Feature f, List<Field> fields, T t) throws Exception {
         for (int i = 0, c = fields.size(); i < c; i++) {
             Field field = fields.get(i);
@@ -641,9 +561,6 @@
         }
     }
 
-    /**
-     * 璁剧疆Timestamp
-     */
     private static void setTimestamp(Feature f, int i, Timestamp time) {
         if (null == time) {
             return;
@@ -653,9 +570,6 @@
         f.SetField(i, local.getYear(), local.getMonthValue(), local.getDayOfMonth(), local.getHour(), local.getMinute(), local.getSecond(), 8);
     }
 
-    /**
-     * 璁剧疆LocalDate
-     */
     private static void setLocalDate(Feature f, int i, LocalDate local) {
         if (null == local) {
             return;

--
Gitblit v1.9.3