From e7b9dbbda0174c085e84d812ee9a01a83cd9d5f8 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 20 九月 2023 11:06:23 +0800 Subject: [PATCH] 1 --- ExportMap/cs/PyLasUtils.cs | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/ExportMap/cs/PyLasUtils.cs b/ExportMap/cs/PyLasUtils.cs index c34060b..95fbc34 100644 --- a/ExportMap/cs/PyLasUtils.cs +++ b/ExportMap/cs/PyLasUtils.cs @@ -106,5 +106,22 @@ return pubid; } + + /// <summary> + /// 鍧愭爣杞崲 + /// </summary> + public static string CsTransform(string epsg, double x, double y, double z = 0) + { + List<string> cmds = new List<string>(); + + string gdalPath = Tools.GetSetting("gdalPath"); + cmds.Add(string.Format("\"{0}\\gdaltransform.exe\" -s_srs EPSG:{1} -t_srs EPSG:4326", gdalPath, epsg.Replace("EPSG:", ""))); + cmds.Add(string.Format("{0} {1} {2}\n", x, y, z)); + + string rs = null; + rs =Tools.ExecCmd(cmds); + + return rs; + } } } -- Gitblit v1.9.3