Skip to content
Prev 2978 / 29559 Next

clipping a large image on R

On Fri, 11 Jan 2008, Henrik Bengtsson wrote:

            
First, please only write to one list at a time - this reply to both to 
continue thread.

Please read the documentation in the rgdal package properly, then on the 
format (unknown) that your data are in on www.gdal.org if necessary. Use 
the arguments to readGDAL() or asSGDF_GROD() in ?readGDAL, and/or 
getRasterData() or getRasterTable() in ?"GDALRasterBand-class", most 
likely offset= to offset the origin in rows and columns, and region.dim= 
to set the numbers of rows and columns to access.

You should be able to work out the ones you need from the smaller image 
that you can read. The GDALinfo() function should give you enough 
information on the larger file to help set up offset= and region.dim= - if 
resampling is needed, use output.dim= as well. If you have multiple bands, 
you can choose those too.

Roger