How Generate Network Spatial Weights works

A spatial weights matrix quantifies the spatial relationships that exist among the features in your dataset. Many tools in the Spatial Statistics toolbox evaluate each feature within the context of its neighboring features. The spatial weights matrix file defines those neighbor spatial relationships. (For more information about spatial weights and spatial weights matrix files, see Spatial weights).

Typically, spatial relationships among a set of features have been defined using Euclidean distance measurements and contiguity, fixed, or inverse distance weighting schemes (see Modeling spatial relationships). However, for many applications, including retail analysis, accessibility to services, emergency response, evacuation planning, and traffic incident analyses, defining spatial relationships in terms of real-world travel networks (roads, railways, footpaths, for example) is more appropriate. The Generate Network Spatial Weights tool allows you to model and store spatial relationships based on time or distance between point features in the case where travel is restricted to a network dataset. This tool requires a license for the Network Analyst extension.

You provide a point feature class representing both feature origins and feature destinations. You also provide an existing network dataset (see Designing a network dataset or use one of the ready to use network datasets that come with ESRI Data & Maps). The Generate Network Spatial Weights tool locates each point on the network and quantifies, in distance or time, the proximity between each and every other feature. The resultant proximity solution for any two features will optionally consider barriers and/or restrictions (road closures, for example). These proximity relationships are stored in little endian binary format using sparse matrix techniques to minimize use of disk space and computer memory and the number of required calculations. These relationship values are utilized in the mathematics of several spatial statistics tools including Spatial Autocorrelation (Global Moran's I), Hot Spot Analysis (Getis-Ord Gi*), and Cluster and Outlier Analysis (Anselin Local Moran's I). While the spatial weights matrix file can conceivably store N x N spatial relationships, in most cases, each feature should only be related to a handful of others. The sparse methodology takes advantage of this by only storing nonzero relationships.


ESRI Data & Maps, free to ArcGIS users, contains StreetMap data including a prebuilt network dataset in SDC format. The coverage for this dataset is the United States and Canada. These network datasets can be used directly by the Generate Network Spatial Weights tool.

Additional resources

Anselin, L. (1988). Spatial Econometrics: Methods and Models. Boston: Kluwer.

Getis, A., and Aldstadt, J. (2004). "Constructing the Spatial Weights Matrix Using a Local Statistic." Geographical Analysis 36(2):90–104.

Haining, R. (2003). Spatial Data Analysis: Theory and Practice. Cambridge, UK: Cambridge University Press.

Price, Mike. (Fall 2009). "It's all about streets." ArcUser Online. ESRI.