Re: [R-sig-Geo] reading KML files in R

2010-05-28 Thread Roger Bivand
On Thu, 27 May 2010, Wade Wall wrote: I am not exactly sure what you mean by identify the correct layer name. Using R under Linux, this is what happens. I have a file in the current directory named ASMI_GA.kml library(rgdal) tmp-readOGR(., layer=ASMI_GA.kml) However, I get the following

[R-sig-Geo] from R to ArcMap

2010-05-28 Thread Rui Catarino
Hello to all, Is there a way of transforming an output of levelplot function in a ArcMap raster? Basically I have a script from a colleague that uses data from surveys and transforms it into smooth levelplot's. I have look around but all I get is the opposite from ArcMap raster to R.

Re: [R-sig-Geo] circular holes in rectangular polygon

2010-05-28 Thread Adrian.Baddeley
Jan Quets jan.qu...@ua.ac.be writes: I want to make a rectangular window with circular holes within. I have tried and searched but not found a solution yet. library(spatstat) R - owin(c(0,4),c(0,5)) O - disc(radius=1, centre=c(2, 3)) W - complement.owin(O, frame=R) plot(W)

Re: [R-sig-Geo] existance of a specific non-overlapping marked spatial model in spatstat or other R package?

2010-05-28 Thread Adrian.Baddeley
Jan Quets jan.qu...@ua.ac.be writes: I am looking for a specific non-overlapping marked spatial model for use as a null model for monte carle simulations with use of the 'envelope' function in spatstat. the specific marked spatial model should: *generate a spatial random pattern with a

Re: [R-sig-Geo] Elevation histogram for each region

2010-05-28 Thread Clélia Bilodeau
Thank you for your help. I'm still working on it. I think the use of polygonValues is a good idea, but the script: library(raster) lst = list() for (i in 1:nzones) { p - polygonValues(pol,r, fun=function(x){x==i}) lst[[i]] = histogram(p[,3]) } doesn't work yet. Do I have to define a function to

Re: [R-sig-Geo] Better print method for Spatial*DataFrames?

2010-05-28 Thread Etienne Bellemare Racine
I taught I could add my two cents. Nice suggestion! I agree ! options(width=60) print(meuse[1:3,], sWKT=T) I don't know what's sWKT, but the folowing output is the kind of printing I would like by default. Sometimes I make the mistake of printing a spatial polygon data frame and it can

Re: [R-sig-Geo] existance of a specific non-overlapping marked spatial model in spatstat or other R package?

2010-05-28 Thread Nicholas Lewin-Koh
Hi, I don't think the code exists, but I think that there are modifications of the algorithm Rolf described that may be much faster. I assume the predetermined set of marks is a set of distinct classes with different radii. One thing that comes to mind is you may want to generate the marks first

Re: [R-sig-Geo] Better print method for Spatial*DataFrames?

2010-05-28 Thread Roger Bivand
On Fri, 28 May 2010, Etienne Bellemare Racine wrote: I taught I could add my two cents. Nice suggestion! I agree ! No. Only for SpatialPointDataFrame objects, which is what it does already. Please, understand that str() is a *much* better choice in effectively all cases where summary()

Re: [R-sig-Geo] Better print method for Spatial*DataFrames?

2010-05-28 Thread Barry Rowlingson
On Fri, May 28, 2010 at 5:18 PM, Roger Bivand roger.biv...@nhh.no wrote: On Fri, 28 May 2010, Etienne Bellemare Racine wrote: I taught I could add my two cents. Nice suggestion! I agree ! No. Only for SpatialPointDataFrame objects, which is what it does already. Please, understand that

Re: [R-sig-Geo] existance of a specific non-overlapping marked spatial model in spatstat or other R package?

2010-05-28 Thread Nicholas Lewin-Koh
Ok My 2c is going to go up to a quarter. Having discussed this a little more with a colleague, we realized that a sequential approach may not work so well, because in a finite region so many configurations would be inadmissible and and you would have to reject the whole thing, unless the density

Re: [R-sig-Geo] Elevation histogram for each region

2010-05-28 Thread Robert J. Hijmans
Clélia, Here is a example with polygonValues. It works under the assumption that all the raster cells for a single polygon can be held in memory. library(raster) # creating some polygons p1 - rbind(c(-180,-20), c(-140,55), c(10, 0), c(-140,-60), c(-180,-20)) p2 - rbind(c(-10,0), c(140,60),

Re: [R-sig-Geo] from R to ArcMap

2010-05-28 Thread Robert J. Hijmans
Rui, For writing to raster formats that can be read by ArcGIS you can have a look at writeGDAL() in 'rgdal' or writeRaster() in 'raster'. None of these formats support cells of varying sizes (which I believe is something that levelplot might produce). Robert On Fri, May 28, 2010 at 1:58 AM, Rui

Re: [R-sig-Geo] reading KML files in R

2010-05-28 Thread Wade Wall
Thanks Dr. Bivand, I was able to import my kml file using your example. I opened up the kml file in a text editor to find out the layer name, but system(paste(ogrinfo, paste(td, cities.kml, sep=/)), intern=TRUE) also works to find the name. As for modifying ogrinfo(), I will take a look and see

[R-sig-Geo] helps in predicting with spatial data

2010-05-28 Thread Steve Hong
Dear list, I have data collected from a field (rectangular shape). Sampling points within the field are regularly spaced (about every 4 meters). My overall goal is to predict (or estimate) at other points within the same field. My main question is: Do I have to use a different approach when I

[R-sig-Geo] Spatial Logit Model

2010-05-28 Thread Francisco Silva
Hello everybody, I am trying to do a spatial logit model with the spatially autoregressive error structure - SAE. Right now, I did an implementation and i would like to check the results. Somebody knows with there is a package in R that estimates parameters to spatial logit model with SAE