raster reading AND writing functions