Re: [R-sig-Geo] problems with points2grid

2010-11-02 Thread Edzer Pebesma
There is a difference between visual perception of points being on a grid, and the numerical confirmation of this. Have you tried grid_new - points2grid(SpatialPoints(coord_nficentroid), tolerance= 0.41, round=NULL, fuzz.tol=3) as the message sugggested? On 11/02/2010 03:03 AM, Yan

Re: [R-sig-Geo] Bubble plot from SpatialPolygons object

2010-11-02 Thread Edzer Pebesma
On 11/01/2010 09:53 PM, Muenchen, Robert A (Bob) wrote: Hi All, I'm having great fun learning the vast array of mapping options in R. I'm now working on a teaching example (below) that will step slowly through creating a tiny map, converting it to SpatialPolygons and then plotting a

[R-sig-Geo] Reassigning coordinates?

2010-11-02 Thread Brian Oney
Hello List, I need to reassign coordinates of a few points to have coordinates of the nearest raster cell. I KNOW that this is BAD practice but for the time being I assume that it does not affect my analysis (species distribution analysis). I think the datum of the point data is different

Re: [R-sig-Geo] Reassigning coordinates?

2010-11-02 Thread Roger Bivand
On Tue, 2 Nov 2010, Brian Oney wrote: Hello List, I need to reassign coordinates of a few points to have coordinates of the nearest raster cell. I KNOW that this is BAD practice but for the time being I assume that it does not affect my analysis (species distribution analysis). I think the

Re: [R-sig-Geo] Bubble plot from SpatialPolygons object

2010-11-02 Thread Muenchen, Robert A (Bob)
That did it, thanks. Love your book! Cheers, Bob -Original Message- From: r-sig-geo-boun...@stat.math.ethz.ch [mailto:r-sig-geo- boun...@stat.math.ethz.ch] On Behalf Of Edzer Pebesma Sent: Tuesday, November 02, 2010 3:05 AM To: r-sig-geo@stat.math.ethz.ch Subject: Re: [R-sig-Geo] Bubble

Re: [R-sig-Geo] Reassigning coordinates?

2010-11-02 Thread Barry Rowlingson
On Tue, Nov 2, 2010 at 10:00 AM, Brian Oney zenli...@gmail.com wrote: Hello List, I need to reassign coordinates of a few points to have coordinates of the nearest raster cell. I KNOW that this is BAD practice but for the time being I  assume that it does not affect my analysis (species

[R-sig-Geo] Error when reading shapefiles (readOGR) with rgdal

2010-11-02 Thread Antoine Gardarin
Dear all I am having problems when reading shapefiles using readOGR with the rgdal package. I have read several times these files in the past without any problem. Since a few days, while I apparently did not change anything (no update, similar version of R, same shapefiles), I always have

Re: [R-sig-Geo] How to make a raster with distances to lines or point features

2010-11-02 Thread Robert J. Hijmans
Manuel, You can have a look at: library(raster) ?distance Robert On Mon, Nov 1, 2010 at 4:39 AM, Manuel Spínola mspinol...@gmail.com wrote: Dear list members, I am interested in knowing how to make a raster with distance to lines or point features.  For example distance to rivers or

Re: [R-sig-Geo] problems with points2grid

2010-11-02 Thread Robert J. Hijmans
Yan, An alternative approach, if you want to force regularly spaced points to a grid that you know the parameters of, you could first create that grid and then link the values by cell numbers library(raster) r - raster(ncol=10, nrow=10, xmn=.. xmx= etc) cells - cellFromXY(r, xy) r[cells] -

Re: [R-sig-Geo] Reassigning coordinates?

2010-11-02 Thread Brian Oney
Hello Barry and Roger, Thank you for the suggestions. I got the nn2() function to work and took the coordinates of the nearest non-NA raster cell and assigned them to the points. I forgot to mention that I have raster cells that are non-NA and some that are not and my point lay in the NA zone