Exemple #1
0
        public void ToGeographic_Crtm05CoordinateSystem_Converted()
        {
            var latitude  = 1105744;
            var longitude = 500000;

            var geographicCoordinateSystem = ConvertCoordinates.ToGeographic(new Crtm05CoordinateSystem(latitude, longitude));

            Assert.Equal(10, Math.Round(geographicCoordinateSystem.Latitude));
            Assert.Equal(9, geographicCoordinateSystem.LatitudeDegrees);
            Assert.Equal(59, geographicCoordinateSystem.LatitudeMinutes);
            Assert.Equal(60, Math.Round(geographicCoordinateSystem.LatitudeSeconds));

            Assert.Equal(-84, Math.Round(geographicCoordinateSystem.Longitude));
            Assert.Equal(-84, geographicCoordinateSystem.LongitudeDegrees);
            Assert.Equal(0, geographicCoordinateSystem.LongitudeMinutes);
            Assert.Equal(0, Math.Round(geographicCoordinateSystem.LongitudeSeconds));
        }