国家大地2000坐标系的椭球坐标系(4490)与平面坐标系(投影坐标系)4547,4548,4549...的面积对比
IWorkspaceFactory pWSF = new FileGDBWorkspaceFactoryClass(); IFeatureWorkspace pFWS = (IFeatureWorkspace)pWSF.OpenFromFile(@"D:\gis数据\测试0303.gdb", 0); IFeatureClass Featureclass = pFWS.OpenFeatureClass("CS"); IFeatureClass Featureclass2 = pFWS.OpenFeatureClass("CS_4547"); IFeatureClass Featureclass3 = pFWS.OpenFeatureClass("CS_4548"); IFeatureClass Featureclass4 = pFWS.OpenFeatureClass("CS_4549"); var fcur = Featureclass.Search(null, false); var fcur2 = Featureclass2.Search(null, false); var fcur3 = Featureclass3.Search(null, false); var fcur4 = Featureclass4.Search(null, false); IFeature pFeature = fcur.NextFeature(); IFeature pFeature2 = fcur2.NextFeature(); IFeature pFeature3 = fcur3.NextFeature(); IFeature pFeature4 = fcur4.NextFeature(); IPolygon polygon = pFeature.ShapeCopy as IPolygon; IPolygon polygon2 = pFeature2.ShapeCopy as IPolygon; IPolygon polygon3 = pFeature3.ShapeCopy as IPolygon; IPolygon polygon4 = pFeature4.ShapeCopy as IPolygon; IArea pArea = polygon as IArea; IArea pArea2 = polygon2 as IArea; IArea pArea3 = polygon3 as IArea; IArea pArea4 = polygon4 as IArea; double area = Math.Abs(pArea.Area); double area2 = Math.Abs(pArea2.Area); double area3 = Math.Abs(pArea3.Area); double area4 = Math.Abs(pArea4.Area); //4490 IAreaGeodetic areaGeodetic = polygon as IAreaGeodetic; ISpatialReferenceFactory srf = new SpatialReferenceEnvironmentClass(); ILinearUnit unit = srf.CreateUnit((int)esriSRUnitType.esriSRUnit_Meter) as ILinearUnit; double area11 = areaGeodetic.get_AreaGeodetic(esriGeodeticType.esriGeodeticTypeGeodesic, unit); //zhaun4547转4490 //IGeometry geo22 = (IGeometry)po
同一个图形作转换与对比:
//总结:4547,4548转换成4490,然后计算其面积跟4490的是相差不多的
//4547转4548或者是转4549,跟没有转换的4548,4549的也是相差不多的
//如果没有转换的话,相同的图斑4490与4547,4548,4549...的面积是依次相差越来越大的
标签:
C# soe
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了