Пример #1
0
        /// <inheritdoc/>
        public override IRaster ReadBlock(int xOff, int yOff, int sizeX, int sizeY)
        {
            Raster <T> result = new Raster <T>(sizeY, sizeX)
            {
                Data = ReadRaster(xOff, yOff, sizeX, sizeY)
            };
            Coordinate topLeft = Bounds.CellCenterToProj(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(sizeY, sizeX, aff);
            result.NoDataValue = NoDataValue;
            result.Projection  = Projection;
            result.IsInRam     = true;
            return(result);
        }