[R-sig-Geo] subset large file using Spatial polygons?
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Wed Aug 5 00:48:44 CEST 2009
ElenaC wrote:
> 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?
>
AFAIK, no. But this would certainly be a welcome extension!
> Thanks!
> Elena
>
>
>
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de/
http://www.springer.com/978-0-387-78170-9 e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list