嗨,
我是一个民用3D用户,我正在尝试实现此代码以将本地坐标(x, y)转换为UTM网格坐标(北,东):
Dim gd As GeoLocationData=DB.GeoDataObject.GetObject(OpenMode.ForRead)
Dim As Matrix3d=Matrix3d.Displacement(gd.DesignPoint.GetVectorTo(gd.ReferencePoint))
m=m*Matrix3d.Rotation(gd.NorthDirection,gd.UpDirection,gd.DesignPoint)
m=m*Matrix3d.Scaling(gd.ScaleFactor,gd.DesignPoint)
Dim ptUTM as Point3d=ptLOCAL.TransformBy(m)
但是,gd.ScaleFactor始终返回1,即使gd.ScaleEstimationMethod=ScaleEstimationMethod.ScaleEstMethodReferencePoint
注意:民用3D返回正确的值:
Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument.Settings.DrawingSettings.TransformationSettings.GridScaleFactor
怎么了?我错过了什么吗?
M = M - Math.Sin(6 * phi) * (esq * esq * esq * (35 / 3072))
M = M * SemiMajorAxis 'Arc length along standard meridian
Dim x = k0 * N * A * (1 + A * A * ((1 - T + C) / 6 + A * A * (5 - 18 * T + T * T + 72 * C - 58 * e0sq) / 120)) 'Easting relative To CM
x = x + 500000 'Easting standard
Dim y = k0 * (M - M0 + N * Math.Tan(phi) * (A * A * (1 / 2 + A * A * ((5 - T + 9 * C + 4 * C * C) / 24 + A * A * (61 - 58 * T + T * T + 600 * C - 330 * e0sq) / 720)))) 'Northing from equator