| | |
| | | { |
| | | private static string pyFile; |
| | | |
| | | /// <summary> |
| | | /// 默认最大级别 |
| | | /// </summary> |
| | | public static int DEFAULT_MAX_LEVEL = 16; |
| | | |
| | | /// <summary> |
| | | /// 默认最大文件大小:5GB |
| | | /// </summary> |
| | | public static long DDEFAULT_MAX_SIZE = 5L * 1024 * 1024 * 1024; |
| | | |
| | | /// <summary> |
| | | /// 获取Python文件 |
| | |
| | | /// </summary> |
| | | private static int GetTerrainMaxLevel(XYZArgs args, string tifFile) |
| | | { |
| | | FileInfo fi = new FileInfo(tifFile); |
| | | if (fi.Length > DDEFAULT_MAX_SIZE) return DEFAULT_MAX_LEVEL; |
| | | |
| | | string ctbPath = Tools.GetSetting("ctbPath"); |
| | | string dirPath = GetTerrainPath(args.dircode); |
| | | |
| | |
| | | } |
| | | if (File.Exists(layerJson)) File.Delete(layerJson); |
| | | |
| | | return level; |
| | | return level > DEFAULT_MAX_LEVEL ? DEFAULT_MAX_LEVEL : level; |
| | | } |
| | | |
| | | /// <summary> |