Implements the Albers projection.

Implements the Albers projection. The Albers projection is most commonly used to project the United States of America. It gives the northern border with Canada a curved appearance.

The Albers Equal Area projection has the property that the area bounded by any pair of parallels and meridians is exactly reproduced between the image of those parallels and meridians in the projected domain, that is, the projection preserves the correct area of the earth though distorts direction, distance and shape somewhat.

Inheritance: MapProjection
示例#1
0
 /// <summary>
 /// Returns the inverse of this projection.
 /// </summary>
 /// <returns>IMathTransform that is the reverse of the current projection.</returns>
 public override IMathTransform Inverse()
 {
     if (_inverse == null)
     {
         _inverse = new AlbersProjection(this._Parameters, !_isInverse);
     }
     return(_inverse);
 }
        private static IMathTransform CreateCoordinateOperation(IProjection projection, IEllipsoid ellipsoid)
        {
            List<ProjectionParameter> parameterList = new List<ProjectionParameter>(projection.NumParameters);
            for (int i = 0; i < projection.NumParameters; i++)
                parameterList.Add(projection.GetParameter(i));

            parameterList.Add(new ProjectionParameter("semi_major", ellipsoid.SemiMajorAxis));
            parameterList.Add(new ProjectionParameter("semi_minor", ellipsoid.SemiMinorAxis));

            IMathTransform transform = null;
            switch (projection.ClassName.ToLower())
            {
                case "mercator_1sp":
                case "mercator_2sp":
                    //1SP
                    transform = new Mercator(parameterList);
                    break;
                case "transverse_mercator":
                    transform = new TransverseMercator(parameterList);
                    break;
                case "albers":
                    transform = new AlbersProjection(parameterList);
                    break;
                case "lambert_conformal_conic":
                case "lambert_conformal_conic_2sp":
                    transform = new LambertConformalConic2SP(parameterList);
                    break;
                default:
                    throw new NotSupportedException(String.Format("Projection {0} is not supported.", projection.ClassName));
            }
            return transform;
        }
		/// <summary>
		/// Returns the inverse of this projection.
		/// </summary>
		/// <returns>IMathTransform that is the reverse of the current projection.</returns>
		public override IMathTransform Inverse()
		{
			if (_inverse == null)
			{
				_inverse = new AlbersProjection(this._Parameters, !_isInverse);
			}
			return _inverse;
		}
		private static IMathTransform CreateCoordinateOperation(IProjection projection, IEllipsoid ellipsoid, ILinearUnit unit)
		{
			List<ProjectionParameter> parameterList = new List<ProjectionParameter>(projection.NumParameters);
			for (int i = 0; i < projection.NumParameters; i++)
				parameterList.Add(projection.GetParameter(i));

			parameterList.Add(new ProjectionParameter("semi_major", ellipsoid.SemiMajorAxis));
			parameterList.Add(new ProjectionParameter("semi_minor", ellipsoid.SemiMinorAxis));
			parameterList.Add(new ProjectionParameter("unit", unit.MetersPerUnit));
			IMathTransform transform = null;
			switch (projection.ClassName.ToLower(System.Globalization.CultureInfo.InvariantCulture).Replace(' ', '_'))
			{
				case "mercator":
				case "mercator_1sp":
				case "mercator_2sp":
					//1SP
					transform = new Mercator(parameterList);
					break;
				case "transverse_mercator":
					transform = new TransverseMercator(parameterList);
					break;
				case "albers":
				case "albers_conic_equal_area":
					transform = new AlbersProjection(parameterList);
					break;
				case "lambert_conformal_conic":
				case "lambert_conformal_conic_2sp":
				case "lambert_conic_conformal_(2sp)":
					transform = new LambertConformalConic2SP(parameterList);
					break;
				default:
					throw new NotSupportedException(String.Format("Projection {0} is not supported.", projection.ClassName));
			}
			return transform;
		}