I think Darren is using the standard Windows binary rgdal package, which does not include any GDAL drivers that depend on external DLLs, so does not include netCDF. Unless he wants to rebuild against the FWTools or OSGEO4W DLLs (as described in the file readme.WINDOWS in the package), another option is the binary ncdf package for Windows. On other platforms, it is typically easier to meet external dependencies (for some definition of easier).

Roger

---
Roger Bivand, NHH, Helleveien 30, N-5045 Bergen,
Roger.Bivand@nhh.no



-----Original Message-----
From: r-sig-geo-bounces@stat.math.ethz.ch on behalf of Barry Rowlingson
Sent: Mon 24.08.2009 16:58
To: Darren Norris
Cc: r-sig-geo@stat.math.ethz.ch
Subject: Re: [R-sig-Geo] GDAL Error - .grd not recognised as a supported file
 
On Mon, Aug 24, 2009 at 3:42 PM, Barry
Rowlingson<b.rowlingson@lancaster.ac.uk> wrote:

>  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.
>

 This works for me:

> e=readGDAL("ETOPO1_Ice_g_gdal.grd",output.dim=c(100,100))
ETOPO1_Ice_g_gdal.grd has GDAL driver GMT
and has 10801 rows and 21601 columns

 So it must just be your GDAL not having drivers for these files.

 Note you can sub-sample in readGDAL, you don't need to go to the lower level.

 rgdal'  gdalDrivers() function should tell you what drivers your gdal
supports - I see this in mine:

28        GMT                                   GMT NetCDF Grid Format

 It's a single-band image and I don't think the colour palette is in there.

 Note you can sub-sample in readGDAL, you don't need to go to the
lower level, by doing output.dim=c(y,x).

Barry

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


	[[alternative HTML version deleted]]

