From ae436e2cb0980af757511377215a454c17a35308 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期六, 15 七月 2023 15:18:49 +0800
Subject: [PATCH] 1

---
 ExportMap/cs/LasUtils.cs |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/ExportMap/cs/LasUtils.cs b/ExportMap/cs/LasUtils.cs
index a63b76f..431c67b 100644
--- a/ExportMap/cs/LasUtils.cs
+++ b/ExportMap/cs/LasUtils.cs
@@ -143,5 +143,37 @@
 
             return pubid;
         }
+
+        /// <summary>
+        /// 璇诲彇Las鍧愭爣绯�
+        /// </summary>
+        public static List<int> ReadLasCs(XYZArgs args, ref string err)
+        {
+            List<SysMeta> list = XYZUtils.SelectMetas(args.ids, "and type in ('las', 'laz')");
+            if (null == list || list.Count == 0) return null;
+
+            string uploadFolder = Tools.GetSetting("uploadFolder");
+
+            List<int> ids = new List<int>();
+            foreach (SysMeta meta in list)
+            {
+                string lasPath = Path.Combine(uploadFolder, meta.path);
+                if (!File.Exists(lasPath)) continue;
+
+                int epsg = 0;
+                try
+                {
+                    epsg = Tools.get_las_cs(lasPath.Replace("\\", "/"));
+                }
+                catch (Exception ex)
+                {
+                    LogOut.Error(ex.Message + "\r\n" + ex.StackTrace);
+                    epsg = -1;
+                }
+                ids.Add(epsg);
+            }
+
+            return ids;
+        }
     }
 }

--
Gitblit v1.9.3