weights matrix (.gal) failing

1010
1
03-16-2011 06:33 PM
SaulJackman
New Contributor
Hi all,

I generated a spatial weights matrix using Pysal, and am now trying to compute local moran's I statistics in ArcGIS (v.10).  The extension for the spatial weights matrix is .gal.  I went through the weights matrix and tried to make sure that the format was compatible with ArcGIS (i.e. changed the header to the id variable name, got rid of all "islands").  However, when I try to execute "Cluster and Outlier Analysis", I get the error message "Invalid text weights format."  It's working fine in Geoda, but I prefer to use ArcGIS:)

Does anyone have any ideas what might be causing this?

Thanks!

Saul
0 Kudos
1 Reply
MarkJanikas
New Contributor III
Hi Saul,

Unfortunately, ArcGIS does not accept GAL files.  If you are going to use text based weights the format is:

UniqueIDFieldName ---> first line tells us the name of the unique ID field
1 5 .20000 ----> ID NeighborID Weight
1 4 .20000
...
...
...


I think GeoDa has a way to store the weights in GWT format... which I think is very close to what you need for our software... you may need to adjust the header.

You can also create spatial weights using the Generate Spatial Weights Matrix tool.  You will get Distance based, knearestNeighs, Delaunay Triangulation as well as Polygon Contiguity.  The resulting *.swm file can be used in our tools and is quite fast to read and write... as they are binary files.

Hope this helps!  Take Care,

MJ
0 Kudos