| | |
| | | |
| | | 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; |
| | | } |
| | | } |
| | | } |