Mexican Spotted Owl, stretching...

ArcGIS Tools
ArcView 3.x Extensions
GIS Consultation
Unit Converter
Jenness Enterprises

Distance Matrix

NAME: Distance and Azimuth Matrix, v. 2.1   (Click Name to Download)

Aka: dist_mat_jen.avx

Last modified:  February 24, 2005

View Online PDF Manual  (requires Adobe Acrobat Reader)

TOPICS:  Distance, Azimuth, Matrix, Array, dBASE, Excel, delimited, delimiter, text, comma, tab, space

AUTHOR:  Jeff Jenness, GIS Analyst

Jenness Enterprises

3020 N. Schevene Blvd.

Flagstaff, AZ 86004

DESCRIPTION:  This extension produces a matrix of values showing the distances between pairs of features, and/or azimuths between pairs of points. You can generate distances and azimuths between features in a single theme or between features in two separate themes.

Output:  Matrices can be saved to dBASE tables, Excel spreadsheets, or text-delimited files (using commas, tabs or spaces as the delimitors). Text-delimited files can hold many more columns of data than either dBASE tables or Excel spreadsheets.

All or only selected records:  You can either use all the features in your themes for the analysis or only a selected subset of features. If any features in your themes are selected, then only those selected features will be used in the analysis. If no features are selected, then all features will be used in the analysis.

Projected vs. Unprojected Views:  If your original data are in Lat/Long coordinates (the Geographic Projection) and your View has been projected, then you have the option of calculating distances or azimuths based on either the Geographic Projection or your View Projection. The choice of projections can dramatically affect the distance and azimuth values. If your data are unprojected points (regardless of your View projection), then you have the option to use geodesic curves for the most accurate measures possible.

REQUIRES:  This extension requires that the file "avdlog.dll" be present in the ArcView/BIN32 directory (or $AVBIN/avdlog.dll) and that the Dialog Designer extension be located in your ArcView/ext32 directory, which they usually are if you're running AV 3.1 or better. The Dialog Designer doesn't have to be loaded; it just has to be available. If you are running AV 3.0a, you can download the appropriate files for free from ESRI at:

Recommended Citation Format: For those who wish to cite this extension, the author recommends something similar to:

Jenness, J. 2005. Distance Matrix (dist_mat_jen.avx) extension for ArcView 3.x, v. 2. Jenness Enterprises. Available at:

Please let me know if you cite this extension in a publication ( I will update the citation list to include any publications that I am told about.

Updates:  Version 1.3 (February 17, 2004) adds the option to calculate great circle (geodesic) distances if both Row and Column themes are Point themes.  Version 1.4 (May 25, 2004) adds the option to generate an azimuth matrix for point features.

Version 2 (February 7, 2005) adds the option to export to text-delimited files or Microsoft Excel tables.

Version 2.1 (February 24, 2005) incorporates internal changes to make it run faster on very large matrices.

Acknowledgments: The author thanks Dr. Evelyn J. Peters (Associate Professor) and Oksana Starchenko (Ph.D. Candidate), from the Department of Geography, University of Saskatchewan, and the Canadian Foundation for Innovation, for suggestions and financial support leading to Version 2 of this extension.

General Instructions:

1)  Begin by placing the "dist_mat_jen.avx" file into the ArcView extensions directory (../../Av_gis30/Arcview/ext32/).

2)  After starting ArcView, load the extension by clicking on File --> Extensions… , scrolling down through the list of available extensions, and then clicking on the checkbox next to the extension called "Distance Matrix, v. 2."

3)  The extension adds 3 buttons to your View button bar:

  Creates a distance matrix between features.

  Creates an azimuth matrix between point features.

  Combines multiple text files containing portions of a matrix into a single combined matrix text file.

4) The extension also adds a menu item to your Table Edit menu, enabling you to generate a record number field.

For detailed instructions, view the on-line PDF version of Distance and Azimuth Matrix Manual         

Enjoy! Please contact the author if you have problems or find bugs.

            Jeff Jenness                            

            Jenness Enterprises                

            3020 N. Schevene Blvd.                     (928) 607-4638

            Flagstaff, AZ  86004


Please visit Jenness Enterprises ArcView Extensions site for more ArcView Extensions and other software by the author.  We also offer customized ArcView-based GIS consultation services to help you meet your specific data analysis and application development needs.