If grid2DSquareCellAbstractFactory is null then grid2DSquareCell is directly masked and
returned, otherwise a new Grid2DSquareCellAbstract result is contructed using
grid2DSquareCellAbstractFactory.
Returns a new Grid2DSquareCellDouble that is a copy of grid, but
with the value of cells in grid that intersect rectangle given by
(startRowIndex,startColIndex,endRowIndex,endColIndex) set to its
noDataValue.