Esempio n. 1
0
        public void ToSweRef99_FromWgs84(double lat, double lng, double expectedLat, double expectedLng, int decimals)
        {
            var pos       = new WGS84Position(lat, lng);
            var converted = PositionConverter.ToSweRef99(pos);

            Assert.AreEqual(Math.Round(expectedLat, decimals, MidpointRounding.AwayFromZero), Math.Round(converted.Latitude, decimals, MidpointRounding.AwayFromZero));
            Assert.AreEqual(Math.Round(expectedLng, decimals, MidpointRounding.AwayFromZero), Math.Round(converted.Longitude, decimals, MidpointRounding.AwayFromZero));
        }