[R-sig-Geo] Neighbor matrix from shp file

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed May 12 13:44:34 CEST 2010


On Tue, May 11, 2010 at 9:40 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> On Tue, 11 May 2010, Barry Rowlingson wrote:

> Use the snap= argument to poly2nb() set to a larger but still small value
> than default in that case, say 10m for projected coordinates.

 Ooh, yes, that's fixed it.

> Barry, if you'd like to try SVN spdep from R-forge (and maybe also SVN rgeos
> from R-forge), you'll find a number of speedups. Any feedback on those would
> be very welcome.

 Computing the adjacency for about 1500 polygons with 127,000
coordinate points takes about 11 seconds - I should only need to do
this once so I don't think I'll investigate speedups at the moment!

thanks!

Barry

-- 
blog: http://geospaced.blogspot.com/
web: http://www.maths.lancs.ac.uk/~rowlings
web: http://www.rowlingson.com/
twitter: http://twitter.com/geospacedman
pics: http://www.flickr.com/photos/spacedman



More information about the R-sig-Geo mailing list