IAffineTransformation2D3GEN::TransformPointsFF method returns incorrect results in ArcGIS 9.3.
上次发布: August 25, 2014ArcGIS for Desktop
漏洞 ID 编号
NIM052295
已提交
December 22, 2009
上次修改时间
June 5, 2024
适用范围
ArcGIS for Desktop
找到的版本
9.3.1
编程语言
C#
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
No Public Explanation
解决办法
There is a workaround that can be used with the versions of the software that they have. Instead of accessing the TransformPointsFF method through the IAffineTransformation2D3GEN interface, they need to access it through the ITransformationGEN interface. I have verified that this works in a 931 debug build. I’ve attached the relevant portion of their sample code, with the modification applied in red.Please let me know if this works for them. Please forward my apologies to AED-SICAD and ESRI Germany for the problems caused by this. IAffineTransformation2D3GEN IAffineTransformation = new AffineTransformation2DClass(); IAffineTransformation.DefineFromControlPoints(ref fromPoints, ref toPoints); ITransformationGEN t = (ITransformationGEN)IAffineTransformation; double fromError = 0, toError = 0; for (int j = 0; j < fromPoints.Length; j++) { IAffineTransformation.GetControlPointError(j, ref fromError, ref toError); dataGridView1["ErrE", j].Value = ToString(fromError, 3); dataGridView1["ErrN", j].Value = ToString(toError, 3); } // Punkte sammeln/collect coordinate values to be transformed. List<double> pointsInList = new List<double>(); foreach (DataGridViewRow row in dataGridView2.Rows) { // Von/From points IPoint point1000 = new PointClass(); pointsInList.Add(ToDouble(row.Cells["Easting3"].Value as string, 0)); pointsInList.Add(ToDouble(row.Cells["Northing3"].Value as string, 0)); } // Transform double[] pointsIn = pointsInList.ToArray(); double[] pointsOut = new double[pointsIn.Length]; // Initialize with an arbitrary value for (int j = 0; j < pointsOut.Length; j++) pointsOut[j] = j; //IAffineTransformation.TransformPointsFF(esriTransformDirection.esriTransformForward, ref pointsIn, ref pointsOut); t.TransformPointsFF(esriTransformDirection.esriTransformForward, ref pointsIn, ref pointsOut);