Search code examples
rgisrasterrgdal

Extract Worldclim Data Using R without rgdal package


I have some geographic data points (latitude and longitude), and I want to extract 1km resolution climate data (max, min, mean temperature) for them. There is a nice coded example of how to do this in R here:

The problem is that it requires the 'rgdal' package, and unfortunately this doesn't seem to work with Mavericks, which is what I'm using. I tried the work-around for installing 'rgdal' here, but without success.

Anyone know a workaround for installing rgdal on Mavericks? Or anyone familiar with working with Worldclim in R and know another package or other work-around?

Here is the identifier, lat/long for the sites:

 id<-c('SV2050','SV515','SV3250')
 lat<-c(9.53333,9.49989,9.55875)
 long<-c(-83.8167,-84.0315,-83.7434)
 cbind(id,lat,long)

Solution

  • Whether you need the rgdal package depends on the file format of the raster data. You can download the WorldClim data in a generic binary format (BIL). The raster package can read these without rgdal.