Beispiel #1
0
        public DD ToDD()
        {
            DD result = new DD();

            decimal degrees = this._degrees;
            decimal minutes = this._minutes;
            decimal seconds = this._seconds;

            if ((this._quadrasphere == Quadrasphere.North) || (this._quadrasphere == Quadrasphere.East))
            {
                result.Degrees = (degrees + minutes / 60) + (seconds / 3600);

                if (this._quadrasphere == Quadrasphere.North)
                {
                    result.DDType = DDType.Latitude;
                }
                else
                {
                    result.DDType = DDType.Longitude;
                }
            }
            else if ((this._quadrasphere == Quadrasphere.South) || (this._quadrasphere == Quadrasphere.West))
            {
                result.Degrees = Math.Abs((degrees + minutes / 60) + (seconds / 3600)) * (-1);
                result.DDType  = DDType.Longitude;

                if (this._quadrasphere == Quadrasphere.South)
                {
                    result.DDType = DDType.Latitude;
                }
                else
                {
                    result.DDType = DDType.Longitude;
                }
            }

            return(result);
        }
Beispiel #2
0
 public LatLng(DMS Latitude, DMS Longitude)
 {
     this._latitude = Latitude.ToDD ();
     this._longitude  = Longitude.ToDD ();
 }
Beispiel #3
0
 public LatLng(DD Latitude, DD Longitude)
 {
     this._latitude = Latitude;
     this._longitude = Longitude;
 }
Beispiel #4
0
 public LatLng(Decimal Latitude, Decimal Longitude)
 {
     this._latitude = new DD (Latitude, DDType.Latitude);
     this._longitude = new DD (Longitude, DDType.Longitude);
 }
Beispiel #5
0
 public LatLng()
 {
     this._latitude = new DD ();
     this._longitude = new DD ();
 }
Beispiel #6
0
 public LatLng(DMS Latitude, DMS Longitude)
 {
     this._latitude  = Latitude.ToDD();
     this._longitude = Longitude.ToDD();
 }
Beispiel #7
0
 public LatLng(DD Latitude, DD Longitude)
 {
     this._latitude  = Latitude;
     this._longitude = Longitude;
 }
Beispiel #8
0
 public LatLng(Decimal Latitude, Decimal Longitude)
 {
     this._latitude  = new DD(Latitude, DDType.Latitude);
     this._longitude = new DD(Longitude, DDType.Longitude);
 }
Beispiel #9
0
 public LatLng()
 {
     this._latitude  = new DD();
     this._longitude = new DD();
 }
Beispiel #10
0
        public DD ToDD()
        {
            DD result = new DD ();

            decimal degrees = this._degrees;
            decimal minutes = this._minutes;
            decimal seconds = this._seconds;

            if ((this._quadrasphere == Quadrasphere.North) || (this._quadrasphere == Quadrasphere.East))
            {
                result.Degrees =  (degrees + minutes / 60) + (seconds / 3600);

                if (this._quadrasphere == Quadrasphere.North)
                {
                    result.DDType = DDType.Latitude;
                }
                else
                {
                    result.DDType = DDType.Longitude;
                }
            }
            else if ((this._quadrasphere == Quadrasphere.South) || (this._quadrasphere == Quadrasphere.West))
            {
                result.Degrees =  Math.Abs ((degrees + minutes / 60) + (seconds / 3600)) * (-1);
                result.DDType = DDType.Longitude;

                if (this._quadrasphere == Quadrasphere.South)
                {
                    result.DDType = DDType.Latitude;
                }
                else
                {
                    result.DDType =  DDType.Longitude;
                }
            }

            return result;
        }