示例#1
0
        /// <summary>
        /// Creates the projection required for the European raster data from the AA.
        /// </summary>
        /// <returns>ICoordinateTransformation that implements the Mercator projection.</returns>
        public static ICoordinateTransformation CreateEuropeanLambertProjection()
        {
            string wktSourceCS = Projections.EuropeanLambert;

            IProjectedCoordinateSystem sourceCS = (IProjectedCoordinateSystem) CoordinateSystemWktReader.Create(wktSourceCS);
            IGeographicCoordinateSystem targetCS = CreateWgs84();

            CoordinateTransformationFactory coordTransFactory = new CoordinateTransformationFactory();
            ICoordinateTransformation projection = coordTransFactory.CreateFromCoordinateSystems(sourceCS, targetCS);
            return projection;
        }
示例#2
0
        /// <summary>
        /// Creates a Meractor projection object. 
        /// </summary>
        /// <param name="centralMeridian">The central merdian to use.</param>
        /// <param name="falseNorthing">The false northing to use.</param>
        /// <returns>ICoordinateTransformation that implements the Mercator projection.</returns>
        public static ICoordinateTransformation CreateMercatorProjection( double centralMeridian, double falseNorthing )
        {
            string wktSourceCS = Projections.Mercator;
            wktSourceCS = String.Format(CultureInfo.InvariantCulture, wktSourceCS, falseNorthing, centralMeridian);

            IProjectedCoordinateSystem sourceCS = (IProjectedCoordinateSystem) CoordinateSystemWktReader.Create(wktSourceCS);
            IGeographicCoordinateSystem targetCS = CreateWgs84();

            CoordinateTransformationFactory coordTransFactory = new CoordinateTransformationFactory();
            ICoordinateTransformation projection = coordTransFactory.CreateFromCoordinateSystems(sourceCS, targetCS);
            return projection;
        }
示例#3
0
        /// <summary>
        /// Creates a Meractor projection object.
        /// </summary>
        /// <param name="centralMeridian">The central merdian to use.</param>
        /// <param name="falseNorthing">The false northing to use.</param>
        /// <returns>ICoordinateTransformation that implements the Mercator projection.</returns>
        public static ICoordinateTransformation CreateUKNationalGridProjection(double centralMeridian, double falseNorthing)
        {
            string wktSourceCS = Projections.UKNationalGrid;

            wktSourceCS = String.Format(CultureInfo.InvariantCulture, wktSourceCS, falseNorthing, centralMeridian);

            IProjectedCoordinateSystem  sourceCS = (IProjectedCoordinateSystem)CoordinateSystemWktReader.Create(wktSourceCS);
            IGeographicCoordinateSystem targetCS = CreateWgs84();

            CoordinateTransformationFactory coordTransFactory = new CoordinateTransformationFactory();
            ICoordinateTransformation       projection        = coordTransFactory.CreateFromCoordinateSystems(sourceCS, targetCS);

            return(projection);
        }