[R-sig-Geo] Open grd files in R

Michael Sumner mdsumner at gmail.com
Mon Nov 1 00:09:26 CET 2010


There are multiple file types that might use the .grd extension,
including NetCDF and some Surfer files. Do you know what kind of file
it is?

Try opening the file with rgdal, or raster,  e.g.:

library(rgdal)
GDALinfo("file.grd")

library(raster)
r <- raster("file.grd")


If neither of those you work you may need a GDAL/rgdal build with the
appropriate drivers, so next I would investigate with GDAL itself
which can auto-detect if it knows the file type - but again your build
needs the appropriate drivers:

gdalinfo file.grd

What operating system are you using?

Cheers, Mike.




On Mon, Nov 1, 2010 at 8:34 AM, Peter Larson <pslarson2 at gmail.com> wrote:
> Hello again,
>
> Next question. Does anyone know how to open grd files in R? Or how to
> convert them into ascii? I find some info, but what I find doesn't work for
> me, or requires that I buy something.
>
> Any ideas?
>
> Pete
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
Michael Sumner
Institute for Marine and Antarctic Studies, University of Tasmania
Hobart, Australia
e-mail: mdsumner at gmail.com



More information about the R-sig-Geo mailing list