Пример #1
0
 /// <summary>
 /// Initialize a new UTMPoint with the given components.
 /// </summary>
 /// <param name="x">The number of x</param>
 /// <param name="y">The number of y</param>
 /// <param name="z">The number of z</param>
 /// <param name="zone">The number of zone</param>
 /// <param name="hemisphere">The hemisphere in which the UTM point sits</param>
 public UTMPoint(float x, float y, float z, int zone, GlobeHemisphere hemisphere)
 {
     X          = x;
     Y          = y;
     Z          = z;
     Zone       = zone;
     Hemisphere = hemisphere;
 }
Пример #2
0
        /// <summary>
        /// Deserialize the object.
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        private UTMPoint(SerializationInfo info, StreamingContext context)
        {
            if (info is null)
            {
                throw new ArgumentNullException(nameof(info));
            }

            X          = info.GetSingle(nameof(X));
            Y          = info.GetSingle(nameof(Y));
            Z          = info.GetSingle(nameof(Z));
            Zone       = info.GetInt32(nameof(Zone));
            Hemisphere = info.GetEnumFromString <GlobeHemisphere>(nameof(Hemisphere));
        }