| | |
| | | using ExportMap.cs; |
| | | using LFServer.cs; |
| | | using LFServer.Models; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | |
| | | namespace LFServer.Controllers |
| | | namespace ExportMap.Controllers |
| | | { |
| | | public class ExportController : ApiController |
| | | { |
| | |
| | | <Compile Include="cs\ExportUtil.cs" /> |
| | | <Compile Include="cs\LogOut.cs" /> |
| | | <Compile Include="cs\NoBufferPolicySelector.cs" /> |
| | | <Compile Include="cs\SGUtil.cs" /> |
| | | <Compile Include="cs\Tool.cs" /> |
| | | <Compile Include="cs\XYZUtil.cs" /> |
| | | <Compile Include="db\ModelHandler.cs" /> |
| | | <Compile Include="db\PostgreHelper.cs" /> |
| | | <Compile Include="db\SQLiteHelper.cs" /> |
| | |
| | | using System.Text; |
| | | using System.Web; |
| | | |
| | | namespace LFServer.cs |
| | | namespace ExportMap.cs |
| | | { |
| | | public static class ExportUtil |
| | | { |
| | | /// <summary> |
| | | /// åºç®å½ |
| | | /// </summary> |
| | | public static readonly string BaseDir = AppDomain.CurrentDomain.BaseDirectory; |
| | | |
| | | /// <summary> |
| | | /// æå¤§æä»¶æ° |
| | | /// </summary> |
| | |
| | | { |
| | | if (string.IsNullOrEmpty(sourcesPath)) |
| | | { |
| | | sourcesPath = Path.Combine(BaseDir, "Sources"); |
| | | sourcesPath = Path.Combine(Tool.BaseDir, "Sources"); |
| | | } |
| | | |
| | | return sourcesPath; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace ExportMap.cs |
| | | { |
| | | public class SGUtil |
| | | { |
| | | /// <summary> |
| | | /// Mptç®å½ |
| | | /// </summary> |
| | | public static string MptPath |
| | | { |
| | | get |
| | | { |
| | | return ConfigurationManager.AppSettings["mptFolder"]; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 3DMLç®å½ |
| | | /// </summary> |
| | | public static string D3mlFolder |
| | | { |
| | | get |
| | | { |
| | | return ConfigurationManager.AppSettings["3dmlFolder"]; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å»åæ°æ®ç®å½ |
| | | /// </summary> |
| | | public static string LFData |
| | | { |
| | | get |
| | | { |
| | | return ConfigurationManager.AppSettings["lfData"]; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// SGçDBåº |
| | | /// </summary> |
| | | public static string SGDB |
| | | { |
| | | get |
| | | { |
| | | return ConfigurationManager.AppSettings["sgDB"]; |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Web; |
| | | |
| | | namespace ExportMap.cs |
| | | { |
| | | public class XYZUtil |
| | | { |
| | | |
| | | private static string pyFile; |
| | | |
| | | /// <summary> |
| | | /// è·åPythonæä»¶ |
| | | /// </summary> |
| | | public static string PyFile |
| | | { |
| | | get |
| | | { |
| | | if (string.IsNullOrWhiteSpace(pyFile)) |
| | | { |
| | | pyFile = Path.Combine(ExportUtil.SourcesPath, "render.py"); |
| | | } |
| | | |
| | | return pyFile; |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |