示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CompoundGeographic3DTransformation" /> class.
        /// </summary>
        /// <param name="identifier">The identifier.</param>
        /// <param name="name">The name.</param>
        /// <param name="method">The method.</param>
        /// <param name="parameters">The parameters.</param>
        /// <param name="source">The source geographic coordinate reference system.</param>
        /// <param name="target">The target geographic coordinate reference system.</param>
        /// <param name="areaOfUse">The area of use.</param>
        /// <exception cref="System.ArgumentException">The specified method does not contain 3 submethods.</exception>
        public CompoundGeographic3DTransformation(String identifier, String name, CompoundCoordinateOperationMethod method, IDictionary <CoordinateOperationParameter, Object> parameters, GeographicCoordinateReferenceSystem source, GeographicCoordinateReferenceSystem target, AreaOfUse areaOfUse)
            : base(identifier, name, method, null, source, target, areaOfUse)
        {
            if (method.Methods.Count != 3)
            {
                throw new ArgumentException("The specified method does not contain 3 submethods.", "method");
            }

            _sourceConversion = new GeographicToGeocentricConversion((source.Datum as GeodeticDatum).Ellipsoid);
            _transformation   = GeocentricTransformationFactory.FromMethod(method.Methods[1], parameters);
            _targetConversion = new GeographicToGeocentricConversion((target.Datum as GeodeticDatum).Ellipsoid);
        }