[R-sig-Geo] SpatialGridDataFrame to netcdf grid

Edzer J. Pebesma edzer.pebesma at uni-muenster.de
Mon Nov 12 08:56:30 CET 2007


On linux, you should have the netCDF driver istalled; from gdalDrivers() 
I see (on debian etch):

        name                               long_name create  copy
42    netCDF              Network Common Data Format  FALSE  TRUE

Then, reading the documentation of writeGDAL:

     'create2GDAL' creates a GDAL
     data set from a SpatialGridDataFrame object, in particular to be
     able to save to GDAL driver formats that only permit copying
     rather than creation.

Which is the case for net netCDF format. Might work!
--
Edzer

Sebastian P. Luque wrote:
> On Mon, 12 Nov 2007 13:38:57 +1100,
> Michael Sumner <mdsumner at utas.edu.au> wrote:
>
>   
>> Windows or Linux?  My experience is in Windows.  I would writeGDAL() the
>> SGDF to GTiff, then use gdal_translate at the command line to convert to
>> netCDF:
>>     
>
>   
>> gdal_translate -of NetCDF in.tif out.nc
>>     
>
> Thanks for the idea, I'm under GNU/Linux though and don't see that
> command.  It may not be difficult to track down the equivalent though.  At
> any rate, is there some tradeoff to consider when using this these SGDF ->
> GTiff -> NetCDF conversions?  I may have to look deeper into the other
> packages (e.g. RNetCDF as you mentioned).
>
> All the best,
>
>




More information about the R-sig-Geo mailing list