[R-sig-Geo] new RSAGA release (update recommended)

2011-09-07 Thread Alexander Brenning
Dear list, a new release of RSAGA (version 0.92-2) is available on CRAN. It comes with several small but important updates and improvements, which is why I encourage RSAGA users to update to this latest release, and why I provide this short summary of changes. RSAGA integrates SAGA GIS into R,

Re: [R-sig-Geo] rgeos 'union' causes R crash

2011-09-07 Thread Colin Rundel
Hi Ben, My best guess based on the information you have provided is that R is running out of memory, particularly for complex polygons Unions can use a huge amount of memory. Can you check with the task manager what the memory usage looks like when running your code? -Colin On Sep 7, 2011, at

Re: [R-sig-Geo] Simulating spatially autocorrelated data

2011-09-07 Thread Roger Bivand
On Wed, 7 Sep 2011, Terry Griffin wrote: Patrick, Specification of the spatial weights matrix (W) is important, and, in general, the connectedness of the W influences the estimation and inference of the model. When you say that you do not know the "true rho", I suspect you are saying that yo

Re: [R-sig-Geo] "dnearineigh" source code

2011-09-07 Thread Roger Bivand
On Thu, 8 Sep 2011, Ebrahim Jahanshiri wrote: I need to look into the code for "dnearneigh" so that I could get an idea of how to make weight matrices for any observation (i) based on some criteria. But a look into the spdep pack pointed me to the "spdep.dll". Probably written in some other lang

[R-sig-Geo] "dnearineigh" source code

2011-09-07 Thread Ebrahim Jahanshiri
I need to look into the code for "dnearneigh" so that I could get an idea of how to make weight matrices for any observation (i) based on some criteria. But a look into the spdep pack pointed me to the "spdep.dll". Probably written in some other languages. So I guess my question is how can I see th

[R-sig-Geo] Using stack() to extract every Nth band of the input files

2011-09-07 Thread Jonathan Greenberg
R-sig-geo'ers: I'd like to make a stack from a set of 5-band images. Using stack(myfilenames,bands=3) doesn't appear to do it (I'm getting all bands of all my input files). Is it better to do something like: my_rasters=sapply(myfilenames,function(x) { raster(x,band=3) },simplify=FALSE) my_stack

Re: [R-sig-Geo] define projection for Raster data

2011-09-07 Thread Anthony Fischbach
Dear Dieter, Please refer to the documentation of rgdal and sp. Also as another newbie to spatial data in R, I can strongly recommend starting your reading with Bivand, Pebesma and Gómez-Rubio (2008: Applied Spatial Data Analysis with R. Springer). To cast your raster map into a spatialPixelData

Re: [R-sig-Geo] Simulating spatially autocorrelated data

2011-09-07 Thread Terry Griffin
Patrick, Specification of the spatial weights matrix (W) is important, and, in general, the connectedness of the W influences the estimation and inference of the model. When you say that you do not know the "true rho", I suspect you are saying that you do not know the true underlying spatial st

[R-sig-Geo] define projection for Raster data

2011-09-07 Thread didimayr
Hi all, I have a very simple problem, I just want to define a projection for raster data. However I have no experience with spatial analysis with R, so maybe someone could give me a hint: My data are radiation raster data for Austria, in .asc-format . I have the following information: Map pr

Re: [R-sig-Geo] Selecting polygons into buffer given center

2011-09-07 Thread Tom Gottfried
From your initial question I suspect that what you want to do is I <- gIntersects(b, comuniUTM, byID=TRUE) Though this will probably rise the same error, which I suspect comes from the fact, that the polygons in comuniUTM are topologically not correct. You might want to clean them e.g. in GRASS

[R-sig-Geo] rgeos 'union' causes R crash

2011-09-07 Thread Ben Weinstein
Hi all- I'm having an odd issue with the gUnion family of commands from the rgeos package. I'm importing a series of polygons (species) and trying to find the centroid. Each species is only allowed one centroids, so i need to union the multiple polygons. this code works great when run line by line

Re: [R-sig-Geo] Selecting polygons into buffer given center

2011-09-07 Thread luca candeloro
Thank you, I tried the following code: UTM32WGS84<- CRS("+proj=utm +zone=32 +ellps=WGS84 +datum=WGS84 +no_defs") comuniUTM=spTransform(comuni, UTM32WGS84) #where comuni is a SpatialPolygonDataFrame puntoUTM<- spTransform(punto, UTM32WGS84) #where punto is a SpatialPointDataFrame #I create the spa

Re: [R-sig-Geo] Selecting polygons into buffer given center

2011-09-07 Thread Tom Gottfried
Hi Luca, have a look at the functions in package rgeos. regards, Tom Am 07.09.2011 13:12, schrieb luca candeloro: Hello, I'd like to select, given a SpatialPolygonDataframe and a point (of known coordinates), which are the polygons into the buffer (of a given distance) around the point. I trie

[R-sig-Geo] Selecting polygons into buffer given center

2011-09-07 Thread luca candeloro
Hello, I'd like to select, given a SpatialPolygonDataframe and a point (of known coordinates), which are the polygons into the buffer (of a given distance) around the point. I tried the following code, but I don't know how to end it... UTM32WGS84 <- CRS("+proj=utm +zone=32 +ellps=WGS84 +datum=WGS8

Re: [R-sig-Geo] Setting FID values when saving GML files with writeOGR

2011-09-07 Thread Karl Ove Hufthammer
Roger Bivand wrote: > Indeed, the driver internals are a possible solution, see: > > http://www.gdal.org/ogr/drv_gml.html > > which suggests that some reading is possible in OGR >= 1.8.0, but that > writing will first come with OGR >= 1.9.0, that is the development > version, I believe. Thanks.