コード例 #1
0
 /// <inheritdoc/>
 public override IRaster ReadBlock(int xOff, int yOff, int sizeX, int sizeY)
 {
     Raster<T> result = new Raster<T>(sizeY, sizeX);
     result.Data = ReadRaster(xOff, yOff, sizeX, sizeY);
     Coordinate topLeft = Bounds.CellCenter_ToProj(yOff, xOff);
     double[] aff = new double[6];
     Array.Copy(Bounds.AffineCoefficients, 0, aff, 0, 6);
     aff[0] = topLeft.X;
     aff[3] = topLeft.Y;
     result.Bounds = new RasterBounds(sizeX, sizeY, aff);
     result.NoDataValue = NoDataValue;
     result.Projection = Projection;
     result.IsInRam = true;
     return result;
 }