Re: [R-sig-Geo] readRAST6() in {spgrass6}

2011-05-16 Thread Roger Bivand
On Mon, 16 May 2011, Dylan Beaudette wrote: It is hard to know what the upper-limit is on Windows-- as the memory is usually fragmented by the operating system. Correct, the upper limit on other OS is higher in practice. Since you are using GRASS, I would first try a coarsened version of yo

Re: [R-sig-Geo] readRAST6() in {spgrass6}

2011-05-16 Thread Dylan Beaudette
It is hard to know what the upper-limit is on Windows-- as the memory is usually fragmented by the operating system. Since you are using GRASS, I would first try a coarsened version of your terrain-shape rasters via the built-in re-sampling functionality. While this is not ideal, as it is NN-based

Re: [R-sig-Geo] readRAST6() in {spgrass6}

2011-05-16 Thread Sam Prentice
Thanks you for your suggestions. This error is not affected by choice of mapset, and is not limited by my hardware. Further info: I'm running 64-bit windows, 16MB memory, w/multiple cores. GRASS 6.4.1, R 2.12.2. I'm running standalone R using initGRASS() to set GRASS env parameters. The GRASS file

Re: [R-sig-Geo] How do I read/work with PolyLineZM with maptools/sp?

2011-05-16 Thread Roger Bivand
On Mon, 16 May 2011, Mikhail Titov wrote: Roger: I see. It is not a 5-minute job. I'll leave my script as is with `shapefiles` package for now as it is working okay. I just have a feeling that shapefiles is getting quite outdated (last published in 2006) and overall trend is towards structur

Re: [R-sig-Geo] How do I read/work with PolyLineZM with maptools/sp?

2011-05-16 Thread Mikhail Titov
Roger: I see. It is not a 5-minute job. I'll leave my script as is with `shapefiles` package for now as it is working okay. I just have a feeling that shapefiles is getting quite outdated (last published in 2006) and overall trend is towards structured sp and maptools. Thanks for your help! Pe

Re: [R-sig-Geo] How do I read/work with PolyLineZM with maptools/sp?

2011-05-16 Thread Roger Bivand
On Mon, 16 May 2011, Mikhail Titov wrote: Edzer: Thank you for your suggestions, but it doesn't help much. It does not recover either Z or M as attributes or anyhow else. The Z is dropped for SpatialPolygons and SpatialLines everywhere. The M is not a standard part of the specification - it

Re: [R-sig-Geo] How do I read/work with PolyLineZM with maptools/sp?

2011-05-16 Thread Mikhail Titov
Edzer: Thank you for your suggestions, but it doesn't help much. It does not recover either Z or M as attributes or anyhow else. > p <- as(s, "SpatialPointsDataFrame") > names(p) [1] "Id" "Lines.NR" "Lines.ID" "Line.NR" > slotNames(p) [1] "data""coords.nrs" "coords" "bbox"

Re: [R-sig-Geo] How do I read/work with PolyLineZM with maptools/sp?

2011-05-16 Thread Edzer Pebesma
On 05/16/2011 08:22 PM, Mikhail Titov wrote: >> I would try s$M and s$Z to access M and Z when they are attributes. > But what do I do when they are not? It can work for points, but not a line as > I can't have attributes for individual points of a line. I would prefer not > to do any extra con

Re: [R-sig-Geo] How do I read/work with PolyLineZM with maptools/sp?

2011-05-16 Thread Mikhail Titov
> I would try s$M and s$Z to access M and Z when they are attributes. But what do I do when they are not? It can work for points, but not a line as I can't have attributes for individual points of a line. I would prefer not to do any extra conversions in GIS before using R. Do I get it right tha

Re: [R-sig-Geo] How do I read/work with PolyLineZM with maptools/sp?

2011-05-16 Thread Edzer Pebesma
On 05/16/2011 08:06 PM, Mikhail Titov wrote: > Hi all! > > I feel like I’m missing something simple. I can access X & Y coordinates like: > > s <- readShapeLines(elev) > head(coordinates(s@lines[[1]]@Lines[[1]])) > > I can’t seems to find any information on how to access Z and M values. I can

[R-sig-Geo] How do I read/work with PolyLineZM with maptools/sp?

2011-05-16 Thread Mikhail Titov
Hi all! I feel like I’m missing something simple. I can access X & Y coordinates like: s <- readShapeLines(elev) head(coordinates(s@lines[[1]]@Lines[[1]])) I can’t seems to find any information on how to access Z and M values. I can easily access those with `shapefiles` package, but it has a li

[R-sig-Geo] edit.nb problem with an island

2011-05-16 Thread Marc Marí Dell'Olmo
Dear all, I have a cartography with an island, i.e. a polygon that doesn't share border with other polygons (CODIGO=3120104012). I would like to manually assign two areas (CODIGO=3120103024 and CODIGO=3120103014) as a neighborhood areas of this island with the edit.nb function, and after that to o

Re: [R-sig-Geo] density /diversity of points

2011-05-16 Thread Matevž Pavlič
Hi all, I read (just now) about the Simpson idex. This would probably be a good thing to try in my case. Do you have any ideas of how to create a diversity map using Simpson index? . I have just a few more questions about the code : The line below as I understand sets a table for each point

Re: [R-sig-Geo] density /diversity of points

2011-05-16 Thread marcelino.delacruz
Con fecha 15/5/2011, "Matevž Pavlič" escribió: >Hi Marcelino, > >Was out of the office for a while... >Thanks for the help. I think this could work...but can you tell me what this >line does? > >diversity <- apply(mol.tab,1,function(x) sum(x>0)) mol.tab is a table with the number of occurren

Re: [R-sig-Geo] get the centroid of multiple grid centroids

2011-05-16 Thread Barry Rowlingson
On Mon, May 16, 2011 at 8:41 AM, Mathieu Rajerison wrote: > Hi, > > To get the centroids, you just have to type this: > > ctds<-coordinates(polygons) > > polygons being a SpatialPolygons(DataFrame) object > and > ctds being a SpatialPoints(DataFrame) object I'm not sure thats exactly what she ne

Re: [R-sig-Geo] get the centroid of multiple grid centroids

2011-05-16 Thread Mathieu Rajerison
Hi, To get the centroids, you just have to type this: ctds<-coordinates(polygons) polygons being a SpatialPolygons(DataFrame) object and ctds being a SpatialPoints(DataFrame) object 2011/5/14 elaine kuo > Dear list, > > I have multiple bird distribution maps in the form of ArcGIS shape files.

Re: [R-sig-Geo] density /diversity of points

2011-05-16 Thread Mathieu Rajerison
diversity <- apply(mol.tab,1,function(x) sum(x>0)) gives the number of distinct trees located at each point For example, for point 2251, we have > lansing.tab[2251,] blackoak hickorymaple misc redoak whiteoak 007125 which gives > diversi

[R-sig-Geo] hi everybody

2011-05-16 Thread Toke Emil Panduro Petersen
Hi everybody Is it possible to correct for the edge effect in your data when using a regression model. I have to some extent reduce the the effect of the spatial autocorrelation using a standard spatial lag model. Cheers Toke Emil ___ R-sig-Geo m