[R-sig-Geo] using lapply() with Spatial Objects

2014-08-11 Thread Remi Genevest
I have a list of coordinates that each corresponds to the center of polygon. My purpose is to create the polygons using lapply() and plot them on the same device. And actually I have 2 questions : - How can I create some polygons using lapply() with a SpatialPointsDataFrame ? - How can I

[R-sig-Geo] spTransform() error : load package rgdal for spTransform methods

2014-08-06 Thread Remi Genevest
Hi, I am facing a recurrent problem associated with spTransform() function from rgdal package. While I try to change the CRS of a SpatialGrid, I get the following error : Error in spTransform(grd, CRS(+init=epsg:3857)) : load package rgdal for spTransform methods Does anybody know how to

Re: [R-sig-Geo] Create a simple spatial grid

2014-05-22 Thread Remi Genevest
Alright ! You pointed out my goal indeed... but 100meters by 100meters is still a bit too high for a map over Europe. So, this is what I have done : ### create a grid raster ll = CRS(+init=epsg:4326) origin = SpatialPoints(cbind(7,40),ll) grid = raster() ## make resolution ie 0.008 min par

Re: [R-sig-Geo] Create a simple spatial grid

2014-05-21 Thread Remi Genevest
Thanks a lot Barry. Your post perfectly matches what I was looking for. Well now if I want to do a coarser grid covering Europe, what I should do is doing more or less the same thing, just to change the resolution, right? res(r)=c(100,100) # an approximate 100meters squared cells Then I got

Re: [R-sig-Geo] Create a simple spatial grid

2014-05-20 Thread Remi Genevest
You're right, such a high resolution for all over Europe is unrealistic. I should rather build a smaller grid for the 20m*20m cells and make an other coarser grid for the whole Europe. But, anyway, how can I create a spatial grid from scratch, by defining CRS, resolution and extent of my grid ?

Re: [R-sig-Geo] reading CRU files in .dat format into a data frame

2014-05-05 Thread Remi Genevest
Well, thanks for this advice, but actually I already read this page. What I was looking for is close to the issue proposed in this post by Lionel : http://r-sig-geo.2731867.n2.nabble.com/Turning-SpatialPointsDataFrame-to-Raster-using-rasterize-td7582452.html -- View this message in

[R-sig-Geo] reading CRU files in .dat format into a data frame

2014-05-03 Thread Remi Genevest
Hi, I have downloaded some climatic data provided by the Climatic Research Unit (ref: Mitchell et al. (2003) ; CRU TS 1.2 ; 10' resolution for Europe) from there : http://www.cru.uea.ac.uk/cru/data/hrg/timm/grid/CRU_TS_1_2.html http://www.cru.uea.ac.uk/cru/data/hrg/timm/grid/CRU_TS_1_2.html I