src/AircraftTrajectories/Models/Space3D/CoordinateConversion.cs
/// <summary>
/// Converts the corodinates of a 3D point in meters
/// </summary>
/// <param name="point"></param>
/// <returns></returns>
Converts the corodinates of a 3D point in meters
Converts the corodinates of a 3D point in meters
protected Point3D ConvertToMetrics(Point3D point)
        {
            double newX = point.X;
            double newY = point.Y;
            double newZ = point.Z;
            switch (point.CoordinateUnits)
            {
                case CoordinateUnit.imperial:
                    newX = point.X * FeetToMeters;
                    newY = point.Y * FeetToMeters;
                    newZ = point.Z * FeetToMeters;
                    break;
                case CoordinateUnit.metric:
                    break;
                case CoordinateUnit.geographic:
                    var converter = new GeographicToMetric(new ReferencePointRD());
                    var metricPoint = converter.ConvertToXY(point.X, point.Y);
                    newX = metricPoint.X;
                    newY = metricPoint.Y;
                    break;
            }
            return new Point3D(newX, newY, newZ, CoordinateUnit.metric);
        }
protected Point3D ConvertToMetrics ( Point3D point ) { double newX = point . X ; double newY = point . Y ; double newZ = point . Z ; switch ( point . CoordinateUnits ) { case CoordinateUnit . imperial : newX = point . X * FeetToMeters ; newY = point . Y * FeetToMeters ; newZ = point . Z * FeetToMeters ; break ; case CoordinateUnit . metric : break ; case CoordinateUnit . geographic : var converter = new GeographicToMetric ( new ReferencePointRD ( ) ) ; var metricPoint = converter . ConvertToXY ( point . X , point . Y ) ; newX = metricPoint . X ; newY = metricPoint . Y ; break ; } return new Point3D ( newX , newY , newZ , CoordinateUnit . metric ) ; }
Converts the corodinates of a 3D point in meters
Converts the corodinates of a 3D point in meters
None
point
Point3D
None