From curtisb@mrc.ac.za Thu Jun 3 02:45:31 1999 Received: from mxu4.u.washington.edu (mxu4.u.washington.edu [140.142.33.8]) by lists.u.washington.edu (8.9.3+UW99.02/8.9.3+UW99.01) with ESMTP id CAA38864 for ; Thu, 3 Jun 1999 02:45:31 -0700 Received: from mordor.mrc.ac.za (mordor.mrc.ac.za [196.25.195.194]) by mxu4.u.washington.edu (8.9.3+UW99.02/8.9.3+UW99.01) with ESMTP id CAA26032 for ; Thu, 3 Jun 1999 02:45:28 -0700 Received: (from nobody@localhost) by mordor.mrc.ac.za (8.8.8/8.6.9) id LAA28723 for ; Thu, 3 Jun 1999 11:45:19 +0200 (SAST) Received: by mordor via recvmail id 28700; Thu Jun 3 11:45:16 1999 From: "Bronwyn Curtis" To: waphgis@u.washington.edu Date: Thu, 3 Jun 1999 11:43:14 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: (Fwd) Re: Adjacency Matrix Reply-to: curtisb@mrc.ac.za X-pmrqc: 1 Message-ID: <19990603094138892.AAA141.323@mrc.ac.za> Hi! I am forwarding the answer I got when I posed the same question. It works well and hope it is what you are looking for! Regards Bronwyn THIS IS THE USER'S QUESTIO >Hello, I am a user of Mapinfo Professional. > >Could you teach me how to do the followings?; > >(Q1)I have a polygonal map table. > >From this, I would like to generate such a matrix >as shows which polygones are adjacent to each other, >and which are not. For example; > > WA NT SA QL NS >Western_Australia(WA) 0 0 1 1 >Northern_Territory(NT) 0 0 0 >South_Australia(SA) 0 0 >Queensland(QL) 0 >New_Southwales(NS) > >Where 0 indicates adjacency, and 1 indicates non_adjacency. > >Can I make such a matrix(text file) by using Mapinfo command, >or processing mapinfo data file by in-house programme? > AND THE ANSWER Hi, I was solving a similar problem in the following steps: 1. made a column in the table with rowid (using update column) named, say, record#. 2. if original table had a name of mytable, then made a copy of it, named say - copyofmytable, and opened it 3. made the following query using mapbasic window: Select mytable.record#, copyofmytable.record#, AreaOverlap(mytable.obj, copyofmytable.obj)>0 from mytable, copyofmytable where mytable.obj Intersects copyofmytable.obj and mytable.record#<>copyofmytable.record# into adjacency Browse * From adjacency Adjacency table contains a pairwise listing of adjacent polygons, which can be crosstabulated in any database management system. hope this helps Mikhail Spatial Technologiesr Assisting You make faster, more informed decisions through the power of spatial analysis. __________________________________ Box 343 Rivonia 2128 South Africa Voice: (2711) 807 3807 Fax: (2711) 803 0010 Health GIS Centre Medical Research Council P O Box 17120 Congella Durban 4013 South Africa Tel: 031-2051481 Fax: 031-2051498 .