Spatial Weights Files

You can export or import spatial weights from SpaceStat as a contiguity file (*.gal or *.gwt). These files can be read in a text editor or imported into other spatial analysis software products that use these formats.

Contiguity files in the *.gal format contain binary contiguities, such as Y or N (is it a neighbor or not). Files in the *.gwt format contain information on which locations are the neighbors and their weight values.

Binary contiguity relationships (*.gal)

These files indicate whether a region or location has any neighbors, identifying them if so.    

The *.gal file has the following structure when it exports from SpaceStat.  Files imported into SpaceStat need not have the geography name entry.

0

total region count

geography name

egolabel

neighbor count

 

 

neighbor label

neighbor label......

 

egolabel

1

 

 

neighbor label

 

 

egolabel

0

 

 

egolabel

neighbor count

 

etc.

 

 

The first row specifies the total region count and the geography name.

The second row specifies a target region, called an "ego," by its label and a count of its neighbors. An ego without neighbors will be listed as having a neighbor count of zero.

The third row lists the identities of those neighbors if the count is non-zero, with the row continuing until all neighbors have been listed.  

Generalized weights format file (*.gwt)

These files identify the neighbors of each region or location in turn and specify a weight for each pairing. Unlike GAL files, neighbor weight values are included.

The *.gwt file has the following structure

0

total region count

geography name

egolabel

neighbor label

neighbor weight

egolabel

neighbor label

neighbor weight

egolabel

neighbor label

neighbor weight

etc.

 

 

The first row specifies the total region count and the geography name.

All subsequent rows specify a target region, called an "ego," by its label, the label of its neighbor, and the weight of that relationship. An ego without neighbors will be omitted from the list.

 

Table of Contents

Index

Glossary

-Search-

Back