Esempio n. 1
0
File: DD.cs Progetto: sundowndk/SNDK
        public DMS ToDMS()
        {
            DMS result = new DMS ();

            result.Degrees = (int) Math.Abs (this._degrees);
            result.Minutes = (int) Math.Abs ((60 * (Math.Abs (this._degrees) - result.Degrees)));
            result.Seconds = (int) Math.Abs ((60 * ((60 * (Math.Abs (this._degrees) - result.Degrees) - result.Minutes))));

            if (this._ddtype == DDType.Latitude)
            {
                if (this._degrees < 0)
                {
                    result.Quadrasphere = Quadrasphere.South;
                }
                else
                {
                    result.Quadrasphere = Quadrasphere.North;
                }
            }
            else if  (this._ddtype == DDType.Longitude)
            {
                if (this._degrees < 0)
                {
                    result.Quadrasphere = Quadrasphere.West;
                }
                else
                {
                    result.Quadrasphere = Quadrasphere.East;
                }
            }

            return result;
        }
Esempio n. 2
0
 public LatLng(DMS Latitude, DMS Longitude)
 {
     this._latitude = Latitude.ToDD ();
     this._longitude  = Longitude.ToDD ();
 }
Esempio n. 3
0
 public LatLng(DMS Latitude, DMS Longitude)
 {
     this._latitude  = Latitude.ToDD();
     this._longitude = Longitude.ToDD();
 }