Spatial is Not Special – Spatial Interaction (inverse distance)

Today I am cheating a little. In the last post, we created a symmetrical distance matrix using strict distances between 6 cities.  I promised that we would create an Inverse Distance matrix, which is used extensively in economic geography.   I say that I am cheating because to create the Inverse Distance Matrix, you simply place a 1 over the computed distance:

TRANSFORM 1/Min(int(DistanceEarth([Cities].g, [Cities2].g, “mi”)))
SELECT [Cities].name
FROM [Cities], [Cities] AS [Cities2]
GROUP BY [Cities].[Name]
PIVOT [Cities2].[Name]

This creates an inverse distance weight, meaning the closer the cities are to one another, the larger the weight.

Want to create an inverse distance squared matrix?  Just add an exponent (^) to distance:

TRANSFORM 1/Min(int(DistanceEarth([Cities].g, [Cities2].g, “mi”))^2)
SELECT [Cities].name
FROM [Cities], [Cities] AS [Cities2]
GROUP BY [Cities].[Name]
PIVOT [Cities2].[Name]

the results of this query is:

id2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s