/// <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); }
/// <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; }
/// <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)); }
/// <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); } }
/// <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)); } }