Re: [R-sig-Geo] raster package options maxmemory and chunksize

2012-05-17 Thread Robert J. Hijmans
Thanks Tim, That is good to know. The settings are somewhat conservative to avoid virtual memory use on macs (which slows things down a lot on that platform). Still, even the default settings should beat scanning ascii files, so there might be room for improvement. One reason might be that the ras

[R-sig-Geo] Plotting cross-correlograms

2012-05-17 Thread Michael Hewson
G'day List, I'm using package "ncf" to compute and plot cross-correlograms. The documentation for plot.correl notes the syntax is plot.correlg(x, ...) with "x" being the item of class correlog and "..."being "other arguments". I'm interested in finding out what I can put into "other arguments"

[R-sig-Geo] how to determine varying spatial correlation scale

2012-05-17 Thread m p
Hello, I used "correlogram" from "spatial" package to determine correlation scale for my 2d data (x,y,value) but just looking with bare eye it seems that the correlation scale varies over the domain. How can I best determine regional correlation scales? Can someone suggest what would the best way

Re: [R-sig-Geo] Raster getData() problem

2012-05-17 Thread Robert J. Hijmans
Raúl, You are not doing anything wrong. The function does not work for the few countries for which the rasters have been split in multiple files. It is has been fixed for the next release or 'raster'. Thanks, Robert On Tue, May 15, 2012 at 12:58 AM, Raúl Jiménez Rosenberg < raul.jimenez.rosenb..

Re: [R-sig-Geo] Calculating area of region with a raster

2012-05-17 Thread Robert J. Hijmans
Rhys, This returns the approximate area of each cell, which varies with latitude as you use longitude/latitude data. a <- area(ra, na.rm=TRUE) to sum the area by zone (RasterLayer 'world' in your case), you can do zonalarea <- zonal(a, world) For a Raster object with a _planar_ (not Longitud

Re: [R-sig-Geo] raster package options maxmemory and chunksize

2012-05-17 Thread Tim Howard
Some updates for the list archives: Using setOptions(maxmemory = 1e+09, chunksize=1e+08) reduced predict time to about 10 hours 50 min on my system. Good! I also spent the night converting all the GRIDS to native raster format and am trying the next run with that setup to see if read times d

Re: [R-sig-Geo] Adding additional items to plot

2012-05-17 Thread Oscar Perpiñán Lamigueiro
Adam Sparks writes: > Dear all, > I'm attempting to produce some finished product maps using R and have been > struggling with an issue. > > I want to use a hillshade object created from a DEM using the hillShade() > function as a backdrop for my raster data that I'm presenting. > > Behind that I

[R-sig-Geo] Coordinate transformation for directions?

2012-05-17 Thread Barry Rowlingson
spTransform does a great job of transforming points from one CRS to another, but what's the best way of transforming directions? For example, the wind at a point is blowing from the SW in lat-long coordinates. That would be -3pi/4 radians if you consider lat-long as a cartesian coordinate system.

Re: [R-sig-Geo] rgdal package for mac

2012-05-17 Thread Gabriele Cozzi
Hi Roger, sorry for troubling and thanks for the very quick answer. I did follow the guidelines from the CRAN page # setRepositories(ind=1:2) # install.packages('rgdal'), but it did not work. I was successful, however (with the same to lines of code), after shutting down and restating R... ==

Re: [R-sig-Geo] rgdal package for mac

2012-05-17 Thread Roger Bivand
On Thu, 17 May 2012, Gabriele Cozzi wrote: Dear all, I am having issues installing the package "rgdal" on a Mac OS X (Lion). # install.packages("rgdal") actually says that there is no available package for R 2.15.0 (the version I am using at the moment). Yet I can successfully load the rgdal

[R-sig-Geo] rgdal package for mac

2012-05-17 Thread Gabriele Cozzi
Dear all, I am having issues installing the package "rgdal" on a Mac OS X (Lion). # install.packages("rgdal") actually says that there is no available package for R 2.15.0 (the version I am using at the moment). Yet I can successfully load the rgdal package on my old PC (also running R 2.15.0

Re: [R-sig-Geo] trouble with spTransform

2012-05-17 Thread Roger Bivand
On Thu, 17 May 2012, Hodgess, Erin wrote: Hello again. I'm having a little bit of trouble with spTransform (probably I'm doing it wrong), but here is what I'm doing: Original data frame with UTM locations near Phuket, Thailand: test1.df Loceast north 1 a 748.168 602.861 2 b 754.