English

FAQ: What is the format of a Weights Matrix file?

Question

What is the format of a Weights Matrix file?

Answer

A number of spatial statistics tools allow the user to provide a custom weights matrix file. There is a brief description of how to do this at the bottom of the 'Modelling Spatial Relationships' page in the help, however this is no longer current as of the ArcGIS 9.0 Service Pack 2 release.

At Service Pack 2 there has a been a slight change to the format of the Weight Matrix file to make it more flexible. Previously the format of the file was:

FromID ToID Weight

Where the FromID and the ToID were had to be values from the input feature class' Object ID field. This resulted in files that appeared as follows:

0 1 122
0 2 324
1 2 234
1 3 443
and so forth.

However, at Service Pack 2 the user is now able to use values from any field for the FromID and ToID values. Therefore, if a user wants to use values from a field called 'StationID', this is allowed. To facilitate this, the user must supply the ID field name along with the weights matrix file. In the example above the weights matrix file would appear as:

StationID
0 1 122
0 2 324
1 2 234
1 3 443
and so forth.

The user must always provide the field name even if it is the OID or FID field.