MapAround.CoordinateSystems.Transformations.Affine.Transform C# (CSharp) Method

Transform() public method

Transforms a coordinate point.
The passed parameter point should not be modified.
public Transform ( double point ) : double[]
point double An array containing the point coordinates to transform
return double[]
        public override double[] Transform(double[] point)
        {
            if (!_isInverse)
                return apply(point);
            else return applyInverted(point);
        }

Usage Example

        private void calcControlPointsShifts()
        {
            _controlPointsShifts = new ICoordinate[_sourceControlPoints.Length];

            for (int i = 0; i < _sourceControlPoints.Length; i++)
            {
                ICoordinate transformed =
                    PlanimetryEnvironment.NewCoordinate(_optimalAffineTransform.Transform(_sourceControlPoints[i].Values()));

                _controlPointsShifts[i] =
                    PlanimetryEnvironment.NewCoordinate(_destinationControlPoints[i].X - transformed.X,
                                                        _destinationControlPoints[i].Y - transformed.Y);
            }
        }
All Usage Examples Of MapAround.CoordinateSystems.Transformations.Affine::Transform