Beispiel #1
0
        /// <summary>
        /// Specify alternate zone number.
        /// </summary>
        /// <param name="zone">zone number for the alternate representation.</param>
        /// <remarks>
        /// See <see cref="ZoneSpec"/> for more information on the interpretation of zone.
        /// Note that <paramref name="zone"/> == <see cref="ZoneSpec.Standard"/> (the default) use the standard UPS or UTM zone,
        /// <see cref="ZoneSpec.Match"/> does nothing retaining the existing alternate representation.
        /// Before this is called the alternate zone is the input zone.
        /// </remarks>
        public void SetAltZone(int zone = (int)ZoneSpec.Standard)
        {
            if (zone == (int)ZoneSpec.Match)
            {
                return;
            }

            zone = UTMUPS.StandardZone(_lat, _long, zone);
            if (zone == _zone)
            {
                CopyToAlt();
            }
            else
            {
                (_alt_zone, _, _alt_easting, _alt_northing) = UTMUPS.Forward(_lat, _long, out _alt_gamma, out _alt_k, zone);
            }
        }