[R-sig-Geo] subset large file using Spatial polygons?

ElenaC E.Couce.07 at bristol.ac.uk
Tue Aug 4 19:30:47 CEST 2009


Dear all,

I'm a new user of R and the spatial library, so please forgive me if my
question is too basic/silly, but I haven't been able to find an answer, and
I'd really appreciate some help.

Im trying to use a very large (almost 2 GB) dataset with global elevation
and bathymetry info in NETcdf format. I can't load the whole thing into
memory as it is so large. I'm using GDAL.open to get a handle to the data
and now would like to process the information in subsets.

I know that getRasterData can read a subset of a file if I specify the
offset and size I want to read. But the offset and number of rows and
columns depends on the coordinate limits and resolution of the file. Is
there a general method that works using a SpatialPolygons object to define
the limits of the region I want to load into memory? 

Thanks!
Elena


-- 
View this message in context: http://n2.nabble.com/subset-large-file-using-Spatial-polygons--tp3385970p3385970.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list