コード例 #1
0
        public LambertConformalConic1P(Ellipsoid <Meter, Degree> ellipsoid,
                                       double centralMeridian,
                                       double latitudeOfOrigin,
                                       double falseEasting  = 0,
                                       double falseNorthing = 0,
                                       double scaleFactor   = 1.0,
                                       int srid             = 0)
        {
            this._srid = srid;

            this._ellipsoid = ellipsoid;

            this._latitudeOfOrigin = latitudeOfOrigin;

            this._centralMeridian = centralMeridian;

            this._falseEasting = falseEasting;

            this._falseNorthing = falseNorthing;

            this._scaleFactor = scaleFactor;

            double m0 = MapProjects.CalculateM(ellipsoid.FirstEccentricity, latitudeOfOrigin * Math.PI / 180.0);

            double t0 = GeodeticLatitudeToT(latitudeOfOrigin, ellipsoid.FirstEccentricity);

            //REF: MAP PROJECTIONS-A WORKING MANUAL P.108
            this.n = Math.Sin(latitudeOfOrigin * Math.PI / 180);

            this.F = m0 / (n * Math.Pow(t0, n));

            this.rho0 = this._scaleFactor * ellipsoid.SemiMajorAxis.Value * this.F * Math.Pow(t0, n);
        }
コード例 #2
0
        public LambertConformalConic(Ellipsoid <Meter, Degree> ellipsoid, double standardParallel1, double standardParallel2, double centralMeridian, double latitudeOfOrigin, double falseEasting = 0, double falseNorthing = 0, double scaleFactor = 1.0)
        {
            this._ellipsoid = ellipsoid;

            this._latitudeOfOrigin = latitudeOfOrigin;

            this._standardParallel1 = standardParallel1;

            this._standardParallel2 = standardParallel2;

            this._centralMeridian = centralMeridian;

            this._falseEasting = falseEasting;

            this._falseNorthing = falseNorthing;

            this._scaleFactor = scaleFactor;

            //this.scaleFactor = 1;
            double m1 = MapProjects.CalculateM(ellipsoid.FirstEccentricity, standardParallel1 * Math.PI / 180.0);
            double m2 = MapProjects.CalculateM(ellipsoid.FirstEccentricity, standardParallel2 * Math.PI / 180.0);

            double t0 = GeodeticLatitudeToT(latitudeOfOrigin, ellipsoid.FirstEccentricity);
            double t1 = GeodeticLatitudeToT(standardParallel1, ellipsoid.FirstEccentricity);
            double t2 = GeodeticLatitudeToT(standardParallel2, ellipsoid.FirstEccentricity);

            this.n = (Math.Log(m1) - Math.Log(m2)) / (Math.Log(t1) - Math.Log(t2));

            this.F = m1 / (n * Math.Pow(t1, n));

            this.rho0 = this._scaleFactor * ellipsoid.SemiMajorAxis.Value * this.F * Math.Pow(t0, n);
        }