示例#1
0
 /// <summary>
 /// Initializes a new instance of a horizontal datum
 /// </summary>
 /// <param name="ellipsoid">Ellipsoid</param>
 /// <param name="toWgs84">Parameters for a Bursa Wolf transformation into WGS84</param>
 /// <param name="type">Datum type</param>
 /// <param name="name">Name</param>
 /// <param name="authority">Authority name</param>
 /// <param name="code">Authority-specific identification code.</param>
 /// <param name="alias">Alias</param>
 /// <param name="abbreviation">Abbreviation</param>
 /// <param name="remarks">Provider-supplied remarks</param>
 internal HorizontalDatum(
     IEllipsoid ellipsoid, Wgs84ConversionInfo toWgs84, DatumType type,
     string name, string authority, long code, string alias, string remarks, string abbreviation)
     : base(type, name, authority, code, alias, remarks, abbreviation)
 {
     _Ellipsoid           = ellipsoid;
     _Wgs84ConversionInfo = toWgs84;
 }
示例#2
0
 /// <summary>
 /// Checks whether the values of this instance is equal to the values of another instance.
 /// Only parameters used for coordinate system are used for comparison.
 /// Name, abbreviation, authority, alias and remarks are ignored in the comparison.
 /// </summary>
 /// <param name="obj"></param>
 /// <returns>True if equal</returns>
 public bool Equals(Wgs84ConversionInfo obj)
 {
     if (obj == null)
     {
         return(false);
     }
     return(obj.Dx == this.Dx && obj.Dy == this.Dy && obj.Dz == this.Dz &&
            obj.Ex == this.Ex && obj.Ey == this.Ey && obj.Ez == this.Ez && obj.Ppm == this.Ppm);
 }
示例#3
0
        /// <summary>
        /// Creates <see cref="HorizontalDatum"/> from ellipsoid and Bursa-World parameters.
        /// </summary>
        /// <remarks>
        /// Since this method contains a set of Bursa-Wolf parameters, the created
        /// datum will always have a relationship to WGS84. If you wish to create a
        /// horizontal datum that has no relationship with WGS84, then you can
        /// either specify a <see cref="DatumType">horizontalDatumType</see> of <see cref="DatumType.HD_Other"/>, or create it via WKT.
        /// </remarks>
        /// <param name="name">Name of ellipsoid</param>
        /// <param name="datumType">Type of datum</param>
        /// <param name="ellipsoid">Ellipsoid</param>
        /// <param name="toWgs84">Wgs84 conversion parameters</param>
        /// <returns>Horizontal datum</returns>
        public IHorizontalDatum CreateHorizontalDatum(string name, DatumType datumType, IEllipsoid ellipsoid, Wgs84ConversionInfo toWgs84)
        {
            if (String.IsNullOrEmpty(name))
            {
                throw new ArgumentException("Invalid name");
            }
            if (ellipsoid == null)
            {
                throw new ArgumentException("Ellipsoid was null");
            }

            return(new HorizontalDatum(ellipsoid, toWgs84, datumType, name, String.Empty, -1, String.Empty, String.Empty, String.Empty));
        }