You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Further debug reveals the following in ConcatenatedTransform:
Items in the list are not cloned:
public ConcatenatedTransform Clone(){varclonedList=newList<ICoordinateTransformation>(_coordinateTransformationList.Count);foreach(ICoordinateTransformation ct in _coordinateTransformationList)
clonedList.Add(ct);returnnew ConcatenatedTransform(clonedList);}
Which causes the invert function to invert their math transform on the newly created instance:
publicoverridevoidInvert(){
_coordinateTransformationList.Reverse();foreach(ICoordinateTransformation ic in _coordinateTransformationList)
ic.MathTransform.Invert();}
I couldn't find a clone method ICoordinateTransformation, any thoughts?
Using IMathTransform.Inverse() is known to be flaky.
Modify your factory IMathTransform Create() function to return either forward or inverse math transform objects and use those instead of Inverse().
This is my plan in order to workaround this issue, but fixing it inside this library is important in order for other people not to experience this issue.
The following is the code I'm using to create a math transform:
The following is the code, when I tried to run it from immediate window ,
_itmWgs84MathTransform
is the an instance created with the above factory:BTW calling the following code fixes the issue:
_itmWgs84MathTransform.Inverse().Inverse()
I can probably send a pull request if needed, assuming someone will direct me to the right place to look for this.
The text was updated successfully, but these errors were encountered: