//========================================================================= protected void ShallowCopyFrom(iTile a_from) { SourceFile = a_from.SourceFile; RowCountSrc = a_from.RowCountSrc; ColCountSrc = a_from.ColCountSrc; LatSrc = a_from.LatSrc; LonSrc = a_from.LonSrc; TileFile = a_from.TileFile; RowStart = a_from.RowStart; ColStart = a_from.ColStart; RowCount = a_from.RowCount; ColCount = a_from.ColCount; Lat = a_from.Lat; Lon = a_from.Lon; CellSize = a_from.CellSize; NoDataValue = a_from.NoDataValue; Properties = a_from.Properties; CellData = a_from.CellData; }
//========================================================================= public static iTile Create(string a_filename, int a_stripStartPercent, int a_stripWidthPercent, int a_bandStartPercent, int a_bandWidthPercent) { // create a tilemaker and load the data var tileMaker = new iTileMaker(); using (var reader = tileMaker.ReadSourceHeader(a_filename)) { tileMaker.MakeSubTile(a_stripStartPercent, a_stripWidthPercent, a_bandStartPercent, a_bandWidthPercent); tileMaker.LoadSourceData(reader); } // create a fresh tile from the maker base and serialize it var createdTile = new iTile(tileMaker); createdTile.Serialize(); return(createdTile); }
//========================================================================= public iTile(iTile a_from) { ShallowCopyFrom(a_from); }
//========================================================================= private iTileMaker(iTile a_from) : base(a_from) { }