[R-sig-Geo] GDAL Error - .grd not recognised as a supported file

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Mon Aug 24 16:42:27 CEST 2009


On Mon, Aug 24, 2009 at 3:29 PM, Darren Norris<doon75 at hotmail.com> wrote:

> Can anyone suggest the simplest way to get this data into R (I'm avoiding
> the geotif due to bad internet and possible memory limitations on my PC)?

 Given that its 20,000 by 10,000 pixels you might run into memory
limitations with any file format.

> readGDAL(input_file)
>
> Error in .local(.Object, ...) :
>       GDAL Error 4: `C:/Users/Darren/Documents/ecology and
> conservation/SP/data_gis/RASTEr/ETOPO1_Ice_g_gdal.grd' not recognised as a
> supported file format.

 Try this in R:

 GDALinfo(input_file)

 Since you are going to have trouble reading the whole dataset with
readGDAL, it might be easier to use the low-level GDAL functions to
sample from the whole thing. See help(GDAL.open) and
help(getRasterData) for more info.

Barry



More information about the R-sig-Geo mailing list