public static RT90Position ToRt90(this WebMercatorPosition pos)
        {
            var calc     = new WebMercatorCalculator();
            var wgs84Pos = new WGS84Position(calc.YToLatitude(pos.Latitude), calc.XToLongitude(pos.Longitude));

            return(new RT90Position(wgs84Pos, RT90Position.RT90Projection.rt90_2_5_gon_v));
        }
        public static WebMercatorPosition ToWebMercator(this SWEREF99Position pos)
        {
            var calc  = new WebMercatorCalculator();
            var wgs84 = pos.ToWGS84();

            return(new WebMercatorPosition(calc.LatitudeToY(wgs84.Latitude), calc.LongitudeToX(wgs84.Longitude)));
        }
        public static SWEREF99Position ToSweRef99(this WebMercatorPosition pos)
        {
            var calc     = new WebMercatorCalculator();
            var wgs84Pos = new WGS84Position(calc.YToLatitude(pos.Latitude), calc.XToLongitude(pos.Longitude));

            return(new SWEREF99Position(wgs84Pos, SWEREF99Position.SWEREFProjection.sweref_99_tm));
        }
        public static WGS84Position ToWgs84(this WebMercatorPosition pos)
        {
            var calc = new WebMercatorCalculator();

            return(new WGS84Position(calc.YToLatitude(pos.Latitude), calc.XToLongitude(pos.Longitude)));
        }
        public static WebMercatorPosition ToWebMercator(this WGS84Position pos)
        {
            var calc = new WebMercatorCalculator();

            return(new WebMercatorPosition(calc.LatitudeToY(pos.Latitude), calc.LongitudeToX(pos.Longitude)));
        }