[R-sig-Geo] Reading ArcGIS 9.3 spatial weight matrix [swm] file
Gindo Tampubolon
Gindo.Tampubolon at manchester.ac.uk
Thu Mar 18 17:29:44 CET 2010
Dear Roger and all,
Sorry for not putting a sample. Yes, Windows seems to be overloaded.
http://sites.google.com/site/tehtareknow/home/spatial-weight-matrix/
Thanks for the tip and any more help much appreciated,
Gindo
-----Original Message-----
From: Roger Bivand [mailto:Roger.Bivand at nhh.no]
Sent: 18 March 2010 14:23
To: Gindo Tampubolon
Cc: r-sig-geo at stat.math.ethz.ch
Subject: Re: [R-sig-Geo] Reading ArcGIS 9.3 spatial weight matrix [swm] file
On Thu, 18 Mar 2010, Gindo Tampubolon wrote:
> Dear all,
>
> Can anyone tell me how to read ArcGIS 9.3 generated .swm file [spatial
> weight matrix] into R?
Well, make a number of small samples available on a website - most people
do not have access to Arc, so helping is hard. Is there an ESRI site with
shapefiles and matching sample *.swm files?
>
> 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.
>
Always try a subset first. Most likely you need the snap= argument, if the
boundaries do not touch but are close to each other. Almost certainly your
input map also had far too much detail in shorelines and river borders,
leading to your machine getting overloaded (Windows?). Displaying on such
a map would also be dominated by line detail.
> 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?
Contribute by making sample files available. To read a matrix if you must,
use read.table().
Roger
>
>
> 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
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list