管道基础大数据平台系统开发-【CS】-ExportMap
1
13693261870
2023-09-20 124486dbffb46b6a80008b0ba591c254643de0ad
1
已修改2个文件
23 ■■■■■ 文件已修改
DataLoader/CS/GdalHelper.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/MainWindow.xaml.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DataLoader/CS/GdalHelper.cs
@@ -261,5 +261,27 @@
            meta.max = string.Join(",", maxList.ToArray());
        }
        #endregion
        public void CsTransform(double x, double y, int epsg)
        {
            SpatialReference srs = new SpatialReference(null);
            srs.ImportFromEPSG(epsg);
            Geometry point = new Geometry(wkbGeometryType.wkbPoint);
            point.AddPoint(x, y, 0);
            point.AssignSpatialReference(srs);
            if (srs.GetName().Contains("CGCS2000"))
            {
                point.TransformTo(sr4490);
            }
            else
            {
                point.TransformTo(sr4326);
            }
            point.SwapXY();
            double[] xy = new double[] { point.GetX(0), point.GetY(0) };
        }
    }
}
DataLoader/MainWindow.xaml.cs
@@ -36,6 +36,7 @@
            CommonProp.Init();
            this.btnLoad.IsEnabled = false;
            this.btnDel.IsEnabled = false;
            this.btnImport.IsEnabled = false;
            lvView.DataContext = viewDatas;