예제 #1
0
        /// <summary>
        /// Creates a DEM tile creator instance for the specified projection type.
        /// </summary>
        /// <param name="map">
        /// Elevation map used.
        /// </param>
        /// <param name="projectionType">
        /// Projection type desired.
        /// </param>
        /// <param name="path">
        /// Location where the tiles should be serialized.
        /// </param>
        /// <returns>
        /// ITileCreator instance.
        /// </returns>
        public static ITileCreator CreateDemTileCreator(IElevationMap map, ProjectionTypes projectionType, string path)
        {
            if (map == null)
            {
                throw new ArgumentNullException("map");
            }

            if (path == null)
            {
                throw new ArgumentNullException("path");
            }

            IDemTileSerializer serializer = new DemTileSerializer(Path.Combine(path, @"Pyramid\{0}\{1}\DL{0}X{1}Y{2}.dem"));
            return CreateDemTileCreator(map, projectionType, serializer);
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the MercatorDemTileCreator class.
        /// </summary>
        /// <param name="map">
        /// Color map.
        /// </param>
        /// <param name="serializer">
        /// Tile serializer.
        /// </param>
        public MercatorDemTileCreator(IElevationMap map, IDemTileSerializer serializer)
        {
            if (map == null)
            {
                throw new ArgumentNullException("map");
            }

            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }

            this.elevationMap   = map;
            this.tileSerializer = serializer;
            this.ProjectionType = ProjectionTypes.Mercator;
        }
예제 #3
0
        /// <summary>
        /// Initializes a new instance of the MercatorDemTileCreator class.
        /// </summary>
        /// <param name="map">
        /// Color map.
        /// </param>
        /// <param name="serializer">
        /// Tile serializer.
        /// </param>
        public MercatorDemTileCreator(IElevationMap map, IDemTileSerializer serializer)
        {
            if (map == null)
            {
                throw new ArgumentNullException("map");
            }

            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }

            this.elevationMap = map;
            this.tileSerializer = serializer;
            this.ProjectionType = ProjectionTypes.Mercator;
        }
예제 #4
0
        /// <summary>
        /// Creates a DEM tile creator instance for the specified projection type.
        /// </summary>
        /// <param name="map">
        /// Elevation map used.
        /// </param>
        /// <param name="projectionType">
        /// Projection type desired.
        /// </param>
        /// <param name="path">
        /// Location where the tiles should be serialized.
        /// </param>
        /// <returns>
        /// ITileCreator instance.
        /// </returns>
        public static ITileCreator CreateDemTileCreator(IElevationMap map, ProjectionTypes projectionType, string path)
        {
            if (map == null)
            {
                throw new ArgumentNullException("map");
            }

            if (path == null)
            {
                throw new ArgumentNullException("path");
            }

            IDemTileSerializer serializer = new DemTileSerializer(Path.Combine(path, @"Pyramid\{0}\{1}\DL{0}X{1}Y{2}.dem"));

            return(CreateDemTileCreator(map, projectionType, serializer));
        }
예제 #5
0
        /// <summary>
        /// Creates a DEM tile creator instance for the specified projection type.
        /// </summary>
        /// <param name="map">
        /// Elevation map used.
        /// </param>
        /// <param name="projectionType">
        /// Projection type desired.
        /// </param>
        /// <param name="serializer">
        /// Tile serializer instance.
        /// </param>
        /// <returns>
        /// ITileCreator instance.
        /// </returns>
        public static ITileCreator CreateDemTileCreator(IElevationMap map, ProjectionTypes projectionType, IDemTileSerializer serializer)
        {
            if (map == null)
            {
                throw new ArgumentNullException("map");
            }

            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }

            switch (projectionType)
            {
                case ProjectionTypes.Mercator:
                    return new MercatorDemTileCreator(map, serializer);

                default:
                    return new ToastDemTileCreator(map, serializer);
            }
        }
예제 #6
0
        /// <summary>
        /// Creates a DEM tile creator instance for the specified projection type.
        /// </summary>
        /// <param name="map">
        /// Elevation map used.
        /// </param>
        /// <param name="projectionType">
        /// Projection type desired.
        /// </param>
        /// <param name="serializer">
        /// Tile serializer instance.
        /// </param>
        /// <returns>
        /// ITileCreator instance.
        /// </returns>
        public static ITileCreator CreateDemTileCreator(IElevationMap map, ProjectionTypes projectionType, IDemTileSerializer serializer)
        {
            if (map == null)
            {
                throw new ArgumentNullException("map");
            }

            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }

            switch (projectionType)
            {
            case ProjectionTypes.Mercator:
                return(new MercatorDemTileCreator(map, serializer));

            default:
                return(new ToastDemTileCreator(map, serializer));
            }
        }