I am trying to split raster map into chunks to do calculations (with r.mapcalc) on each chunk separately.
I browsed the net and found only the script called r.split.line, which needs vector file to split raster, but this is not that I want.
Is there a way to split raster by rows? For example if I have a GeoTiff file with 8000 rows I want to split it into 8 files 1000 row per each.
Or may by r.mapcalc can do the calculation I want only on specified number of rows?
The function r.tileset (http://grass.osgeo.org/grass64/manuals/html64_user/r.tileset.html) allows you to split your raster layer in user-defined tiles (which could be a tile of one row). The description states that it “produces tilings of the source projection for use in the destination region and projection”. If you use the same projection for source and destination it will just split your layer in tiles.
I am trying to split raster map into chunks to do calculations (with r.mapcalc) on each chunk separately.
I browsed the net and found only the script called r.split.line, which needs vector file to split raster, but this is not that I want.
Is there a way to split raster by rows? For example if I have a GeoTiff file with 8000 rows I want to split it into 8 files 1000 row per each.
Or may by r.mapcalc can do the calculation I want only on specified number of rows?
The gdal_translate utility has a -srcwin option where you can speciify row/col values to “clip” a raster. If your data is Geotiff to begin with, this would be an easy solution.