From ca69628172dbbc8e576ae55d588e99262bb8ac19 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期六, 23 九月 2023 16:48:28 +0800
Subject: [PATCH] 1

---
 ExportMap/cs/TerrainUtils.cs               |    9 ++++-----
 ExportMap/Controllers/ConvertController.cs |    9 ++-------
 ExportMap/ExportMap.csproj                 |    1 +
 ExportMap/Sources/0.terrain                |    1 +
 4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/ExportMap/Controllers/ConvertController.cs b/ExportMap/Controllers/ConvertController.cs
index 18c0499..ae2c210 100644
--- a/ExportMap/Controllers/ConvertController.cs
+++ b/ExportMap/Controllers/ConvertController.cs
@@ -15,20 +15,15 @@
         [HttpGet]
         public string Test()
         {
-            //string name = "8-鐟炰附绔�0.05m.cpt";
-            //string cnName = name.Substring(0, name.LastIndexOf("."));
-
+            //string cnName = "8-鐟炰附绔�0.05m.cpt".Substring(0, "8-鐟炰附绔�0.05m.cpt".LastIndexOf("."));
             //return Tools.GetLocalIP();
-
             //return Tools.GetEPSG("D:\\Moon\\data\\dem_tif\\ldem.tif");
-
             //TerrainUtils.Reproject("D:/xyz/dem/dem/32a.tif", "D:/xyz/dem/dem/32a_4326_.tif", "EPSG:4528", "EPSG:4326");
-
             //TerrainUtils.Project("D:/xyz/dem/dem/32a_4326_.tif", "EPSG:4490");
-
             //string wkt = TerrainUtils.GetPointZ(new XYZArgs() { dircode = "0B" });
             //PyLasUtils.CsTransform("EPSG:4528", 400925.079, 2541768.173);
             //string json = PyLasUtils.GetLasGeomJSON(@"D:\LF\data\las\1_lfz_0.05m.las", 1314);
+            TerrainUtils.Complement(new XYZArgs() { dircode = "00" });
 
             return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
         }
diff --git a/ExportMap/ExportMap.csproj b/ExportMap/ExportMap.csproj
index ddc2b07..fb26561 100644
--- a/ExportMap/ExportMap.csproj
+++ b/ExportMap/ExportMap.csproj
@@ -207,6 +207,7 @@
     <Content Include="Sources\xyz.qgz" />
     <Content Include="TerraBuilder\tb.tbp" />
     <Content Include="Sources\empty.terrain" />
+    <Content Include="Sources\0.terrain" />
   </ItemGroup>
   <PropertyGroup>
     <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
diff --git a/ExportMap/Sources/0.terrain b/ExportMap/Sources/0.terrain
new file mode 100644
index 0000000..33d868b
--- /dev/null
+++ b/ExportMap/Sources/0.terrain
@@ -0,0 +1 @@
+��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
\ No newline at end of file
diff --git a/ExportMap/cs/TerrainUtils.cs b/ExportMap/cs/TerrainUtils.cs
index 9bfa36f..c5c4a07 100644
--- a/ExportMap/cs/TerrainUtils.cs
+++ b/ExportMap/cs/TerrainUtils.cs
@@ -231,7 +231,7 @@
         /// <summary>
         /// 琛ュ厖鏂囦欢
         /// </summary>
-        private static void Complement(XYZArgs args)
+        public static void Complement(XYZArgs args)
         {
             string dirPath = GetTerrainPath(args.dircode);
             string p_0_0 = Path.Combine(dirPath, "0", "0");
@@ -240,13 +240,12 @@
             string p_0_1 = Path.Combine(dirPath, "0", "1");
             if (!Directory.Exists(p_0_1)) Directory.CreateDirectory(p_0_1);
 
-            string s_0_0_0 = Path.Combine(SGUtils.LFData, "dem", "0", "0", "0.terrain");
+            string s_0 = Tools.BaseDir + "\\Sources\\0.terrain";
             string d_0_0_0 = Path.Combine(dirPath, "0", "0", "0.terrain");
-            if (!File.Exists(d_0_0_0)) File.Copy(s_0_0_0, d_0_0_0, true);
+            if (!File.Exists(d_0_0_0)) File.Copy(s_0, d_0_0_0, true);
 
-            string s_0_1_0 = Path.Combine(SGUtils.LFData, "dem", "0", "1", "0.terrain");
             string d_0_1_0 = Path.Combine(dirPath, "0", "1", "0.terrain");
-            if (!File.Exists(d_0_1_0)) File.Copy(s_0_1_0, d_0_1_0, true);
+            if (!File.Exists(d_0_1_0)) File.Copy(s_0, d_0_1_0, true);
 
             string layerJson = Path.Combine(dirPath, "layer.json");
             string[] lines = File.ReadAllLines(layerJson, Encoding.UTF8);

--
Gitblit v1.9.3