[R-sig-Geo] gIntersection for several polygons

2014-11-11 Thread Rebecka
Hi! I´m a beginner with R and I´m trying to calculate area of polygons (homerange areas of 31 individuals) intersecting with bufferzones around 4348 number of windfarms. I have read this webpage as a help: http://rstudio-pubs-static.s3.amazonaws.com/7993_6b081819ba184047802a508a7f3187cb.html

Re: [R-sig-Geo] WriteRaster as Float

2014-11-11 Thread diamant zebrat
Tom, here goes the details The Meteosat images are composed by a matrix of pixels with values of surface temperature (or cloud top temperature) in Kelvin, which means values like 273.15 I wanted to keep the decimals, thus I need a FLT4S 4-byte values. When using

Re: [R-sig-Geo] WriteRaster as Float

2014-11-11 Thread Dutrieux, Loic
Hello Zebrat, The datatype= argument appears to work well on my system. See if you can reproduce the example below: library(raster) r - raster(system.file(external/test.grd, package=raster)) writeRaster(r, filename = 'rasterDefault.tif') GDALinfo('rasterDefault.tif') # By default raster writes

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-11 Thread Dhyey Bhatpuria
Dear Thiago, Your prediction raster (here v1rst) should contain three layers/bands with each named exactly as your predictors (here v1 and v2). Currently it contains just one raster layer. I would suggest to prepare layers and then create a raster brick. Regards, Dhyey -- Dhyey Bhatpuria,

Re: [R-sig-Geo] WriteRaster as Float

2014-11-11 Thread Tom Philippi
Zebrat-- Loic's example works and generates different sized files on my system. sessionInfo(): R version 3.1.1 (2014-07-10) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-11 Thread Thiago Cesar Lima Silveira
Hi, Sorry, I've posted the code with some mistakes. Consider the code below. I've one response, and two predictors, v1 (numeric) and v2 (factor). So, I have just one predictor which is possible to have a raster, the other is a categorical variable. How to predict to rasters considering

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-11 Thread Thiago Silveira
Hi Dhyey Bhatpuria, Sorry, I've posted the code with some mistakes. Consider the code below. I've one response, and two predictors, v1 (numeric) and v2 (factor). So, I have just one predictor which is possible to have a raster, the other is a categorical variable. How to predict to rasters

[R-sig-Geo] Regional Average of Rasters

2014-11-11 Thread Tiffany Smith
I have a rasterBrick (temp) with global temperatures, and a rasterLayer (regions) of global regions. I would like to create a rasterBrick of regional average temperatures. So far I have the following: region1-mask(temp,regions,maskvalue=1,inverse=TRUE) mean1-cellStats(region1,mean)

Re: [R-sig-Geo] gIntersection for several polygons

2014-11-11 Thread Bernd Vogelgesang
Hi Rebecka, I can't help you with your homerange problem right now, but maybe give you a hint about the intersection. I also unsuccesfully tried to use gIntersection until I was told that the raster (!) package has a function intersection which worked perfectly for me. My last R-project

Re: [R-sig-Geo] rsaga.import.gdal gives weird output

2014-11-11 Thread boukepieter
Dear list, For the record; I found a workaround for the mentioned issue. It seems that when changing the file from tiff to sdat something goes wrong in the transformation. In the 'GDAL: import raster' tool of SAGA there is an option to turn transformation on and choose what method to use. This