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

---
 src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java |  405 ++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 272 insertions(+), 133 deletions(-)

diff --git a/src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java b/src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java
index 97c1eb8..d173414 100644
--- a/src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java
+++ b/src/main/java/com/moon/server/entity/shujian/CreateLayerEntity.java
@@ -1,50 +1,30 @@
 package com.moon.server.entity.shujian;
 
-import java.io.Serializable;
+import com.moon.server.helper.StringHelper;
 
-/**
- * 鏁扮畝.鍒涘缓鍥惧眰绫�
- * @author WWW
- * @date 2023-08-30
- */
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 @SuppressWarnings("AlibabaLowerCamelCaseVariableNaming")
 public class CreateLayerEntity implements Serializable {
     private static final long serialVersionUID = 8392354493626395905L;
 
-    /**
-     * 鍥惧眰淇℃伅
-     */
     private Layer layer;
 
-    /**
-     * 褰卞儚鐩綍鍒楄〃
-     */
-    private ImagePathList[] image_path_list;
+    private List<ImagePathList> image_path_list;
 
-    /**
-     * 褰卞儚鍒楄〃
-     */
-    private ImageList[] image_list;
-
-    /**
-     * 閲戝瓧濉旈厤缃�
-     */
     private ImageOvr image_ovr;
 
-    /**
-     * 鍒涘缓鏈嶅姟
-     */
     private Integer create_service;
 
     public CreateLayerEntity() {
-        layer = new Layer();
-        image_ovr = new ImageOvr();
-    }
-
-    public CreateLayerEntity(int pathCount, int imageCount) {
-        this();
-        image_list = new ImageList[imageCount];
-        image_path_list = new ImagePathList[pathCount];
+        this.create_service = 0;
+        this.layer = new Layer();
+        this.image_ovr = new ImageOvr();
+        this.image_path_list = new ArrayList<>();
     }
 
     public Layer getLayer() {
@@ -55,20 +35,12 @@
         this.layer = layer;
     }
 
-    public ImagePathList[] getImage_path_list() {
+    public List<ImagePathList> getImage_path_list() {
         return image_path_list;
     }
 
-    public void setImage_path_list(ImagePathList[] image_path_list) {
+    public void setImage_path_list(List<ImagePathList> image_path_list) {
         this.image_path_list = image_path_list;
-    }
-
-    public ImageList[] getImage_list() {
-        return image_list;
-    }
-
-    public void setImage_list(ImageList[] image_list) {
-        this.image_list = image_list;
     }
 
     public ImageOvr getImage_ovr() {
@@ -87,19 +59,13 @@
         this.create_service = create_service;
     }
 
-    /**
-     * 鍥惧眰淇℃伅
-     */
     public class Layer {
-        /**
-         * 鍚嶇О
-         */
         private String name;
 
         /**
          * nodata璁剧疆锛屾暟缁勶紝鏁扮粍澶у皬鍜屾尝娈垫暟绛夊悓
          */
-        private String[] nodata;
+        private List<Integer> nodata;
 
         /**
          * 鎶曞奖鎴栬�呭潗鏍囷細EPSG:4326
@@ -112,12 +78,12 @@
         private String trans_color;
 
         /**
-         * 杈撳嚭娉㈡锛岄粯璁わ細"1,2,3"
+         * 杈撳嚭娉㈡锛岄粯璁わ細"1,2,3"锛屾垨涓�"3,2,1"
          */
         private String tile_rgb;
 
         /**
-         * 鍥惧眰绫诲瀷銆�0锛氭櫘閫氾紝1锛欴EM鍥惧眰
+         * 鍥惧眰绫诲瀷銆�0锛氭櫘閫氾紝1锛欴EM鍥惧眰锛�2锛氳嚜瀹氫箟
          */
         private Integer type;
 
@@ -144,17 +110,33 @@
         /**
          * 鍙戝竷淇℃伅锛岄粯璁や负"{}"
          */
-        private Object pub_config;
+        private String pub_config;
 
         /**
          * 鍥惧眰鍜屽奖鍍忕浉鍏崇殑閰嶇疆锛岄粯璁�"{}"锛岄厤缃唴瀹瑰寘鎷絾涓嶉檺浜庯細澶勭悊杩囩▼銆佽竟鐣屾帶鍒舵柟娉�
          */
-        private Object config;
+        private Config config;
 
         /**
          * 鎷変几鍥犲瓙锛岄厤鍚� enhance_factor浣跨敤
          */
-        private String enhance_factor;
+        private Double enhance_factor;
+
+        private Integer image_type = -1;
+
+        private Integer sat_id = -1;
+
+        private Integer sensor_id = -1;
+
+        //private Integer pub_status = 0;
+
+        private String type_i = "";
+
+        private String type_ii = "";
+
+        private String type_iii = "";
+
+        private String type_iv = "";
 
         /**
          * 杈圭晫璁$畻鏂瑰紡 0澶栧寘锛�1锛� 鍐呮帴锛� 2 绮惧噯
@@ -162,8 +144,15 @@
         private Integer boundary_cal_mode;
 
         public Layer() {
-            config = new Object();
-            pub_config = new Object();
+            this.projection = "ESRI:104903";
+            this.trans_color = "-1,-1,-1";
+            this.tile_rgb = "1,2,3";
+            this.end_scale = 1.0;
+            this.start_scale = 1048576000.0;
+            this.stats_type = 1;
+            this.enhance_type = 0;
+            this.enhance_factor = null;
+            this.boundary_cal_mode = 0;
         }
 
         public String getName() {
@@ -174,11 +163,11 @@
             this.name = name;
         }
 
-        public String[] getNodata() {
+        public List<Integer> getNodata() {
             return nodata;
         }
 
-        public void setNodata(String[] nodata) {
+        public void setNodata(List<Integer> nodata) {
             this.nodata = nodata;
         }
 
@@ -246,27 +235,27 @@
             this.end_scale = end_scale;
         }
 
-        public Object getPub_config() {
+        public String getPub_config() {
             return pub_config;
         }
 
-        public void setPub_config(Object pub_config) {
+        public void setPub_config(String pub_config) {
             this.pub_config = pub_config;
         }
 
-        public Object getConfig() {
+        public Config getConfig() {
             return config;
         }
 
-        public void setConfig(Object config) {
+        public void setConfig(Config config) {
             this.config = config;
         }
 
-        public String getEnhance_factor() {
+        public Double getEnhance_factor() {
             return enhance_factor;
         }
 
-        public void setEnhance_factor(String enhance_factor) {
+        public void setEnhance_factor(Double enhance_factor) {
             this.enhance_factor = enhance_factor;
         }
 
@@ -276,6 +265,62 @@
 
         public void setBoundary_cal_mode(Integer boundary_cal_mode) {
             this.boundary_cal_mode = boundary_cal_mode;
+        }
+
+        public Integer getImage_type() {
+            return image_type;
+        }
+
+        public void setImage_type(Integer image_type) {
+            this.image_type = image_type;
+        }
+
+        public Integer getSat_id() {
+            return sat_id;
+        }
+
+        public void setSat_id(Integer sat_id) {
+            this.sat_id = sat_id;
+        }
+
+        public Integer getSensor_id() {
+            return sensor_id;
+        }
+
+        public void setSensor_id(Integer sensor_id) {
+            this.sensor_id = sensor_id;
+        }
+
+        public String getType_i() {
+            return type_i;
+        }
+
+        public void setType_i(String type_i) {
+            this.type_i = type_i;
+        }
+
+        public String getType_ii() {
+            return type_ii;
+        }
+
+        public void setType_ii(String type_ii) {
+            this.type_ii = type_ii;
+        }
+
+        public String getType_iii() {
+            return type_iii;
+        }
+
+        public void setType_iii(String type_iii) {
+            this.type_iii = type_iii;
+        }
+
+        public String getType_iv() {
+            return type_iv;
+        }
+
+        public void setType_iv(String type_iv) {
+            this.type_iv = type_iv;
         }
     }
 
@@ -306,7 +351,7 @@
         /**
          * 杩囨护鍣ㄧ粍鍒楄〃锛歔"a.tif|b.tif"]
          */
-        private String[] filter;
+        private List<String> filter;
 
         /**
          * 灞炴�ц繃婊�
@@ -314,9 +359,9 @@
         private Object attr_filter;
 
         public ImagePathList() {
-            datasource = "Local";
-            recursion = 1;
-            image_time = null;
+            this.datasource = "Local";
+            this.recursion = 0;
+            this.filter = new ArrayList<>();
         }
 
         public String getDatasource() {
@@ -351,72 +396,12 @@
             this.image_time = image_time;
         }
 
-        public String[] getFilter() {
+        public List<String> getFilter() {
             return filter;
         }
 
-        public void setFilter(String[] filter) {
+        public void setFilter(List<String> filter) {
             this.filter = filter;
-        }
-
-        public Object getAttr_filter() {
-            return attr_filter;
-        }
-
-        public void setAttr_filter(Object attr_filter) {
-            this.attr_filter = attr_filter;
-        }
-    }
-
-    /**
-     * 褰卞儚鍒楄〃
-     */
-    public class ImageList {
-        /**
-         * 鏁版嵁婧愶細褰撳墠鍙兘涓篖ocal
-         */
-        private String datasource;
-
-        /**
-         * 褰卞儚鐩綍
-         */
-        private String path;
-
-        /**
-         * 褰卞儚鏃堕棿
-         */
-        private String image_time;
-
-        /**
-         * 灞炴�ц繃婊�
-         */
-        private Object attr_filter;
-
-        public ImageList() {
-        }
-
-        public String getDatasource() {
-            return datasource;
-        }
-
-        public void setDatasource(String datasource) {
-            this.datasource = datasource;
-        }
-
-        public String getPath() {
-            return path;
-        }
-
-        public void setPath(String path) {
-            this.path = path;
-        }
-
-        public String getImage_time() {
-            return image_time;
-        }
-
-        public void setImage_time(String image_time) {
-            this.image_time = image_time;
         }
 
         public Object getAttr_filter() {
@@ -448,9 +433,9 @@
         private Integer sample_type;
 
         public ImageOvr() {
-            same_path = 1;
-            force_del = 0;
-            sample_type = 0;
+            this.same_path = 1;
+            this.force_del = 0;
+            this.sample_type = 0;
         }
 
         public Integer getSame_path() {
@@ -477,4 +462,158 @@
             this.sample_type = sample_type;
         }
     }
+
+    /**
+     * 棰滆壊琛ㄩ厤缃�
+     */
+    public class Config {
+        // private Process process
+        private Integer optm;
+
+        private List<Process> online_process;
+
+        public Config(Integer colorTableId, Integer type, List<?> levels) {
+            Process process = new Process(colorTableId, type, levels);
+            this.online_process = new ArrayList<>();
+            this.online_process.add(process);
+
+            this.optm = 1;
+        }
+
+        public Integer getOptm() {
+            return optm;
+        }
+
+        public void setOptm(Integer optm) {
+            this.optm = optm;
+        }
+
+        public List<Process> getOnline_process() {
+            return online_process;
+        }
+
+        public void setOnline_process(List<Process> online_process) {
+            this.online_process = online_process;
+        }
+    }
+
+    /**
+     * 澶勭悊灞傜骇
+     */
+    public class Process {
+        private String uuid;
+
+        private String name;
+
+        private Integer color_table_id;
+
+        private Map<String, Object> config;
+
+        public Process() {
+            this.uuid = StringHelper.getGuid();
+            this.name = "color_table";
+            this.color_table_id = 0;
+
+            this.config = new HashMap<>();
+            this.config.put("default", new Default());
+        }
+
+        /**
+         * 澶勭悊杩囩▼
+         *
+         * @param type   0-榛樿鑹叉澘锛�1-娓愬彉鑹叉澘
+         * @param levels 灞傜骇
+         */
+        public Process(Integer colorTableId, Integer type, List<?> levels) {
+            this();
+            this.color_table_id = colorTableId;
+
+            this.config.put("type", type);
+            this.config.put("levels", levels);
+            if (type > 0) {
+                this.config.put("gradation", "visibility");
+            }
+        }
+
+        /**
+         * 璁剧疆棰滆壊琛�
+         */
+        public void SetColorTable(Integer type, List<?> levels) {
+            config.put("type", type);
+            config.put("levels", levels);
+        }
+
+        public String getUuid() {
+            return uuid;
+        }
+
+        public void setUuid(String uuid) {
+            this.uuid = uuid;
+        }
+
+        public String getName() {
+            return name;
+        }
+
+        public void setName(String name) {
+            this.name = name;
+        }
+
+        public Integer getColor_table_id() {
+            return color_table_id;
+        }
+
+        public void setColor_table_id(Integer color_table_id) {
+            this.color_table_id = color_table_id;
+        }
+
+        public Map<String, Object> getConfig() {
+            return config;
+        }
+
+        public void setConfig(Map<String, Object> config) {
+            this.config = config;
+        }
+    }
+
+    /**
+     * 棰滆壊琛ㄩ粯璁ら厤缃�
+     */
+    public class Default {
+        private Short r;
+
+        private Short g;
+
+        private Short b;
+
+        public Default() {
+            this.r = -1;
+            this.b = -1;
+            this.g = -1;
+        }
+
+        public Short getR() {
+            return r;
+        }
+
+        public void setR(Short r) {
+            this.r = r;
+        }
+
+        public Short getG() {
+            return g;
+        }
+
+        public void setG(Short g) {
+            this.g = g;
+        }
+
+        public Short getB() {
+            return b;
+        }
+
+        public void setB(Short b) {
+            this.b = b;
+        }
+    }
 }

--
Gitblit v1.9.3