[R-sig-Geo] working with large ascii files in R

2013-07-18 Thread Rocio Ponce
Hi there, I'm a newie in using R to make maps... I used to work with ArcGis but I ran out of a valid license... I'm trying to crop the future Worldclim datasets layers which are huge ascii files (of the whole world at 1km resolution, so they are between 3-4GB each) to the extent of Mexico using

Re: [R-sig-Geo] working with large ascii files in R

2013-07-18 Thread Roman Luštrik
Have you considered updating your R and associated packages? There's also a plethora of other GUI based GIS systems. Just the other day, I found Quantum GIS to be very user friendly. That being said, I suggest you use R. :) Cheers, Roman On Thu, Jul 18, 2013 at 9:05 AM, Rocio Ponce

[R-sig-Geo] Extract multiple raster but obtain NULL values

2013-07-18 Thread Diego Valbuena
Hello All,  This must be a simple mistake but I'm trying to get information for few points of 10.000 raster files (TIFF) into a table. If I do it individually, I get the real values for each individual raster. But if I do it using stack (see below), I get the correct values only for the first

Re: [R-sig-Geo] working with large ascii files in R

2013-07-18 Thread Mauricio Zambrano-Bigiarini
On 07/18/2013 09:26 AM, Roman Luštrik wrote: Have you considered updating your R and associated packages? As Roman mentioned, I also suggest you, as first step, to update R (and all the packages) up to version 3 or higher, because one of the significant user changes introduced in R 3.0.0 was

Re: [R-sig-Geo] Scaling SpatialPolygons

2013-07-18 Thread Mathieu Rajerison
Hi, Also, see maptools::elide which gives some functions for that. You could take some material from this git if you want: https://gist.github.com/datagistips/5262410#file-cartograms-r with 2 functions: one using buffer, another one using elide best, mathieu 2013/7/17 Rizzo, Michael

[R-sig-Geo] spplot: correct display of data minimum in colour key

2013-07-18 Thread ulrich.leopold
Dear all,I try to plot a raster map with a correct colour key using spplot. But the minimum seems to be smaller than the data minimum in the colour key. I use the following code:## Summary of raster map summary(slope.grid)Object of class SpatialGridDataFrameCoordinates: min max x 76165.36

Re: [R-sig-Geo] writeRaster to ascii file (.asc)

2013-07-18 Thread Manuel Spínola
Thank you Mauricio, I solved the problem working with tif files instead of grd files. I don't know why but that solved the problem, now the ascii file keep the values of the tif file. Manuel 2013/7/18 Mauricio Zambrano-Bigiarini mauricio.zambr...@jrc.ec.europa.eu On 07/13/2013 01:44 AM,

[R-sig-Geo] CAR vs BESAG

2013-07-18 Thread ipampa
Hello, I am new to spatial stats and I was wondering what is the difference between a CAR and a BESAG model. BYM is equal to BESAG? sorry I am not a statistician -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/CAR-vs-BESAG-tp7584180.html Sent from the R-sig-geo mailing

Re: [R-sig-Geo] working with large ascii files in R

2013-07-18 Thread Robert J. Hijmans
Rocio, You should not use functions read.asc and raster.from.asc because they read all the values into memory. Also please indicated which packages you use. The below should fix the problem: setwd('G:/future_A2a/2020/bccr_bcm2_0_sres_a2_2020s/') library(raster)

Re: [R-sig-Geo] Extract multiple raster but obtain NULL values

2013-07-18 Thread Robert J. Hijmans
Diego, To check what extract does you should look at what it returns! Your object rasValue in this case. Then it should be easy to understand that the mistake is here: combine=cbind(points,rasValue) You can fix it like this: combine=cbind(coordinates(points), rasValue) Robert On Thu, Jul 18,

Re: [R-sig-Geo] spplot: correct display of data minimum in colour key

2013-07-18 Thread Edzer Pebesma
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dear Ulrich, please try the at argument of spplot; see the following example on lattice::levelplot, for which spplot is a front-end: xy = expand.grid(x=1:10,y=1:10) xy$z = runif(100) library(lattice) levelplot(z~x+y,xy)

Re: [R-sig-Geo] working with large ascii files in R

2013-07-18 Thread Rocio Ponce
Dear all, Thank you a lot for your suggestions! (In my email forgot to say which packages I was using... I used raster and SDMTools) I upgraded R packages to the newest version and I'm running the code that Robert suggested. It has been running for almost 4 hours now (there are 8 huge files

[R-sig-Geo] spatial correlation model and variogram

2013-07-18 Thread Moshood Agba Bakare
Dear All, Consider yield as attribute and easting and northing in meters as spatial coordinates. I used gls function of nlme package because of spatial dependency of the residual. I tried to remove large-scale trend by using the easting and northing as covariates of yield.

[R-sig-Geo] Transportation Network Shapefile into a Raster

2013-07-18 Thread Thiemo Fetzer
Dear all, I have another question or problem -- this time it is related to the transformation of a Spatial Lines shapefile into a raster. Let me describe my problem: I want to construct a measure of travel distance from A-B; I have obtained a shapefile of the highway network of the US; in