예제 #1
0
        public static SrsBase AsSrsBase(int srid)
        {
            switch (srid)
            {
            case SridHelper.GeodeticWGS84:
                return(new NoProjection("Wgs84", Ellipsoids.WGS84));   // { DatumName = this.Geogcs.Values?.First() };

            case SridHelper.WebMercator:
                return(new WebMercator());

            case SridHelper.UtmNorthZone38:
                return(new UTM(Ellipsoids.WGS84, MapProjects.CalculateCentralMeridian(38)));

            case SridHelper.UtmNorthZone39:
                return(new UTM(Ellipsoids.WGS84, MapProjects.CalculateCentralMeridian(39)));

            case SridHelper.UtmNorthZone40:
                return(new UTM(Ellipsoids.WGS84, MapProjects.CalculateCentralMeridian(40)));

            case SridHelper.UtmNorthZone41:
                return(new UTM(Ellipsoids.WGS84, MapProjects.CalculateCentralMeridian(41)));

            default:
                return(null);
            }

            //public static CrsBase GetCrs(int srid)
            //{
            //    switch (srid)
            //    {
            //        case GeodeticWGS84:
            //            return DefaultMapProjections.
            //            break;

            //        case WebMercator:
            //            return new WebMercator();

            //        default:
            //            break;
            //    }
            //}
        }
예제 #2
0
        static SrsBases()
        {
            GeodeticWgs84 = new NoProjection();

            WebMercator = new WebMercator();

            //https://epsg.io/3200
            //LccFd58 = new LambertConformalConic(
            //   ellipsoid: Ellipsoids.FD58,
            //   standardParallel1: 29.655083333333333333333333333333,
            //   standardParallel2: 35.314694444444444444444444444444,
            //   centralMeridian: 45.0,
            //   latitudeOfOrigin: 32.5,
            //   falseEasting: 1500000.0,
            //   falseNorthing: 1166200.0,
            //   scaleFactor: 0.9987864078,
            //   srid: 3200);

            LccFd58 = new LambertConformalConic1P(
                ellipsoid: Ellipsoids.FD58,
                centralMeridian: 45.0,
                latitudeOfOrigin: 32.5,
                falseEasting: 1500000.0,
                falseNorthing: 1166200.0,
                scaleFactor: 0.9987864078,
                srid: 3200);


            LccNahrawanIraq = new LambertConformalConic2P(
                ellipsoid: Ellipsoids.NahrawanIraq,
                standardParallel1: 29.655083333333333333333333333333,
                standardParallel2: 35.314694444444444444444444444444,
                centralMeridian: 45.0,
                latitudeOfOrigin: 32.5,
                falseEasting: 1500000.0,
                falseNorthing: 1166200.0,
                scaleFactor: 1);


            LccNahrawan = new LambertConformalConic2P(
                ellipsoid: Ellipsoids.Nahrawan,
                standardParallel1: 29.655083333333333333333333333333,
                standardParallel2: 35.314694444444444444444444444444,
                centralMeridian: 45.0,
                latitudeOfOrigin: 32.5,
                falseEasting: 1500000.0,
                falseNorthing: 1166200.0,
                scaleFactor: 1);

            LccNiocWithClarcke1880Rgs = new LambertConformalConic2P(
                ellipsoid: Ellipsoids.Clarke1880Rgs,
                standardParallel1: 29.655083333333333333333333333333,
                standardParallel2: 35.314694444444444444444444444444,
                centralMeridian: 45.0,
                latitudeOfOrigin: 32.5,
                falseEasting: 1500000.0,
                falseNorthing: 1166200.0,
                scaleFactor: 0.9987864078);

            LccNiocWithWgs84 = new LambertConformalConic2P(
                ellipsoid: Ellipsoids.WGS84,
                standardParallel1: 29.65508274166,
                standardParallel2: 35.31468809166,
                centralMeridian: 45.0,
                latitudeOfOrigin: 32.5,
                falseEasting: 1500000.0,
                falseNorthing: 1166200.0,
                scaleFactor: 0.9987864078);

            UtmNorthZone38 = new UTM(Ellipsoids.WGS84, MapProjects.CalculateCentralMeridian(38));

            UtmNorthZone39 = new UTM(Ellipsoids.WGS84, MapProjects.CalculateCentralMeridian(39));

            UtmNorthZone40 = new UTM(Ellipsoids.WGS84, MapProjects.CalculateCentralMeridian(40));

            UtmNorthZone41 = new UTM(Ellipsoids.WGS84, MapProjects.CalculateCentralMeridian(41));
        }
예제 #3
0
        public static UTM CreateForZone(Ellipsoid ellipsoid, int zone)
        {
            var centralLongitude = MapProjects.CalculateCentralMeridian(zone);

            return(new UTM(ellipsoid, centralLongitude));
        }