Select to view content in your preferred language

Spatial weights error

368
1
07-23-2011 10:09 AM
TatyanaDeryugina
New Contributor
I�??m trying to create a simple inverse-distance based spatial weight matrix with a threshold distance of 1.1 degrees. I�??ve tried following the example given on http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005p00000020000000.htm, but I can�??t get it to work for some reason.


Here�??s the code I�??m trying in the Python command window (using ArcGIS 10):
import arcpy
arcpy.env.workspace = "E:/data/GIS"
arcpy.GenerateSpatialWeightsMatrix_stats("counties_mainland_Project.shp","county_fip","spatial_weights_0811.swm","INVERSE_DISTANCE","EUCLIDIAN","1","1.1", 1,"ROW_STANDARDIZATION")


The first two lines run ok. Here�??s the error I get when I try the third line:

Runtime error <class 'arcgisscripting.ExecuteError'>: Failed to execute. Parameters are not valid. ERROR 000308: Invalid field type ERROR 000800: The value is not a member of EUCLIDEAN | MANHATTAN. Failed to execute (GenerateSpatialWeightsMatrix).

I�??m also not 100% sure I�??m specifying the rest of the command correctly. Any help would be much appreciated!
0 Kudos
1 Reply
LaurenRosenshein
Regular Contributor
Hi!  It looks like you are spelling "EUCLIDEAN" wrong in your code, with an I at the end instead of an E.
0 Kudos