[R-sig-Geo] Reading ArcGIS 9.3 spatial weight matrix [swm] file

Gindo Tampubolon Gindo.Tampubolon at manchester.ac.uk
Thu Mar 18 14:55:32 CET 2010


 
Dear all,

Can anyone tell me how to read ArcGIS 9.3 generated .swm file [spatial weight matrix] into R?

I am stumped at page 242 of the ASDAR book [Bivand et al 2008]. I use a SpatialPolygonsDataFrame object and tried to generate neighbours list using poly2nb(). It took more than 24 hours [European data NUTS level 3 about 1500 regions]. After finishing, the result is a null set.

So I generate a rook weight matrix in ArcGIS 9.3 [and convert it to a table there]. How do I import this matrix to R?


I looked at RArcInfo and rgdal packages but could not find anything obvious; I'm experimenting with read.gwt2nb() but ArcGIS created swm based on numeric ID instead of NUTS_CODE alphanumeric; needs tweaking perhaps.

Many thanks

Gindo



More information about the R-sig-Geo mailing list