使用产品:iDesktop 9D, iobjectsdotnet-9.0.0 操作系统:win7 x64
数据类型: 文件型
问题详细描述:
我用iDesktop 9D 创建投影系 GK Zone 21N (Beijing 1954) 的点 (x:500000, y:4971000)和用程序创建相同点(x:500000, y:4971000)。 做投影转换后为什么结果不同?
(目标投影:WGS_1984_UTM_Zone_51N)
iDesktop结果为(499826.84377033962, 4969143.5704704449),程序为:(500000.00013720366,4968926.6683684)
idesktop操作过程:
1,建立平面坐标 ((x:500000, y:4971000))
2、设置投影坐标系 GK Zone 21N (Beijing 1954)
3、七参数投影转换 、 目标坐标系 WGS_1984_UTM_Zone_51N, 七参数如下:
<sml:Parameters>
<sml:TranslateX>113.7365831470</sml:TranslateX>
<sml:TranslateY>-16.1087181827</sml:TranslateY>
<sml:TranslateZ>77.9394900321</sml:TranslateZ>
<sml:RotateX>0.0000090831</sml:RotateX>
<sml:RotateY>0.0000172978</sml:RotateY>
<sml:RotateZ>-0.0000096760</sml:RotateZ>
<sml:ScaleDifference>-1.2880785982</sml:ScaleDifference>
<sml:RotationOriginX>0.0000000000</sml:RotationOriginX>
<sml:RotationOriginY>0.0000000000</sml:RotationOriginY>
<sml:RotationOriginZ>0.0000000000</sml:RotationOriginZ>
</sml:Parameters>
程序主要如下:
前面建立相关数据源, 工作空间
PrjCoordSys sys1 = new PrjCoordSys();
//sys1.Type = PrjCoordSysType.NoneEarth;
sys1.FromFile(@"G:\GK Zone 21N (Beijing 1954).xml", PrjFileType.SuperMap);
PrjCoordSys sys2 = new PrjCoordSys();
sys2.Type = PrjCoordSysType.Wgs1984Utm51N;
datasource.PrjCoordSys = (sys1);
DatasetVectorInfo info1 = new DatasetVectorInfo("testWgs1984Utm51N", DatasetType.Point);
DatasetVector dataset1 = datasource.Datasets.Create(info1);
dataset1.PrjCoordSys = sys1;
Recordset recordset1 = dataset1.GetRecordset(false, CursorType.Dynamic);
//创建点
Point2D pnt1 = new Point2D();
pnt1.X = 500000;
pnt1.Y = 4971000;
Point2Ds pts = new Point2Ds(pnt1);
CoordSysTransParameter pramt = new CoordSysTransParameter();
//pramt.FromXML(@"C:\Users\Administrator\Desktop\7can.ctp");
pramt.RotateX = 0.0000090831;
pramt.RotateY = 0.0000172978;
pramt.RotateZ = -0.0000096760;
pramt.ScaleDifference = -1.2880785982;
pramt.TranslateX = 113.7365831470;
pramt.TranslateY = -16.1087181827;
pramt.TranslateZ = 77.9394900321;
//坐标转换
Boolean result = CoordSysTranslator.Convert(dataset1, sys2, pramt, CoordSysTransMethod.CoordinateFrame);
result = CoordSysTranslator.Convert(pts, sys1, sys2, pramt, CoordSysTransMethod.CoordinateFrame);
//500000,4971000
GeoPoint geopnt = new GeoPoint(pts[0]);
//geopnt.X = 500000;
//geopnt.Y = 4971000;
//Point2Ds m_point2Ds1 = new Point2Ds();
recordset1.AddNew(geopnt);
recordset1.Edit();
recordset1.Update();
dataset1.Append(recordset1);
datasource.Close();
workspace.Close();
TaskDialog.Show("提示", "完成!");
王先生,qq : 673664011