Skip to content
Back to formatted view

Raw Message

Message-ID: <1305303403346-6359973.post@n2.nabble.com>
Date: 2011-05-13T16:16:43Z
From: Robert J. Hijmans
Subject: projectRaster error with netcdf
In-Reply-To: <4DCD37DA.1020806@colostate.edu>

The second argument in projectRaster is another Raster* object, not a proj.4
string. 

I expect this problem goes away if you do:

x <- projectRaster(r, crs="+proj=longlat +ellps=WGS84 +datum=WGS84
+no_defs")

Robert

>Having an error in getting library raster to read data from a netcdf 
>file when reprojecting a raster. 
>I'd appreciate any workarounds you can suggest. 
>Here's the debug transcript: 
>
>----- 
>debug at NARR.R#142: r <- projectRaster(r, "+proj=longlat +ellps=WGS84 
>+datum=WGS84 +no_defs")

>Browse[2]> n 
>Error in .rasterObjectFromFile(x, band = band, objecttype = 
>"RasterLayer",  : 
>  Cannot create a RasterLayer object from this file. (file does not exist) 

--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/projectRaster-error-with-netcdf-tp6359514p6359973.html
Sent from the R-sig-geo mailing list archive at Nabble.com.