コード例 #1
0
        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));
        }
コード例 #2
0
        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)));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        public static WGS84Position ToWgs84(this WebMercatorPosition pos)
        {
            var calc = new WebMercatorCalculator();

            return(new WGS84Position(calc.YToLatitude(pos.Latitude), calc.XToLongitude(pos.Longitude)));
        }
コード例 #5
0
        public static WebMercatorPosition ToWebMercator(this WGS84Position pos)
        {
            var calc = new WebMercatorCalculator();

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