From 34296b1e1960e49ab8b3a34f9bb49b59e2e22c9e Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 13 九月 2024 15:34:11 +0800
Subject: [PATCH] 查询空间数据

---
 src/main/java/com/se/simu/domain/SeLayer.java |   42 ++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/se/simu/domain/SeLayer.java b/src/main/java/com/se/simu/domain/SeLayer.java
index 36a4419..f7dd7b1 100644
--- a/src/main/java/com/se/simu/domain/SeLayer.java
+++ b/src/main/java/com/se/simu/domain/SeLayer.java
@@ -19,19 +19,45 @@
 
     private List<SeField> fields;
 
+    private JSONArray data;
+
+    private String queryType;
+
     public SeLayer() {
+        this.data = new JSONArray();
     }
 
     public SeLayer(String id, String name) {
+        this();
         this.id = id;
         this.name = name;
+        this.data = new JSONArray();
     }
 
     public SeLayer(String id, String name, Integer dataType, List<SeField> fields) {
+        this();
         this.id = id;
         this.name = name;
         this.dataType = dataType;
         this.fields = fields;
+        this.queryType = getQueryType(dataType);
+    }
+
+    public String getQueryType(Integer dataType) {
+        switch (dataType) {
+            case 2:
+            case 4:
+                return "point";
+            case 1:
+            case 3:
+                return "polyline";
+            default:
+                return "polygon";
+        }
+    }
+
+    public void addData(JSONArray arr){
+        this.data.addAll(arr);
     }
 
     public String getId() {
@@ -65,4 +91,20 @@
     public void setFields(List<SeField> fields) {
         this.fields = fields;
     }
+
+    public JSONArray getData() {
+        return data;
+    }
+
+    public void setData(JSONArray data) {
+        this.data = data;
+    }
+
+    public String getQueryType() {
+        return queryType;
+    }
+
+    public void setQueryType(String queryType) {
+        this.queryType = queryType;
+    }
 }

--
Gitblit v1.9.3