[R-sig-Geo] Can I read only a portion of a raster?
up
u.p at operamail.com
Fri Sep 27 10:37:19 CEST 2013
ben harrison wrote
> I thought I could do something like this:
>
> library(raster)
> my.ext <- extent(xmn, xmx, ymn, ymx)
> my.r <- raster("raster.tif", ext=my.ext)
>
> But it still reads in the entire file. How can I read in only the
> portion I need?
Hi Ben!
What about "crop"?
my.r<-crop("raster.tif",my.ext)
Ciao!
Umberto
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Can-I-read-only-a-portion-of-a-raster-tp7584712p7584734.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list