[R-sig-Geo] Clipping a large image without reading in the entire image

Edzer J. Pebesma e.pebesma at geo.uu.nl
Sat Jun 2 14:30:11 CEST 2007


Andrew Niccolai wrote:

>  Therefore, does anyone have any solutions for reading in an image
>that would work in theory like the following:
>
>setwd(anypathway)
>tif.image <- "VERY_LARGE_IMAGE.tif"
>Bounded.tif <- GDAL.open(tif.image, bbox=c(UpL.X, LwR.X, UpL.Y, LwR.Y))
>
>By the way, I am not set on GDAL.open as the solution but it seems to work
>well reading in Tifs & Jpegs.
>  
>
Well, it does seem to do what you want: opening the data set without 
completely reading it.

You may also want to have a look at the arguments of ?readGDAL, which 
opens/reads/closes in one step, optionally only part (section or lower 
resolution version) of the image.
--
Edzer




More information about the R-sig-Geo mailing list