Open Source GIScience

Joseph Holler's Open Source GIScience Resources at Middlebury College

Gravity Model in QGIS

: In this lesson, we will review the gravity model of spatial interaction and automate it in QGIS graphic modeler.

Do you remember the gravity model of spatial interaction from human geography with GIS? If not, you may review the model here:

Afternoon Lecture

Reminder: it’s best if we keep all of our technical questions in one place: issues There are already some useful questions! I recieve an email notificaton when a new question is posted, and you can as well if you watch the respository: watch repository

Lab

Our first iteration of the gravity model should be able to create service regions composed of input features. Input features are assigned to the service region of the target feature for which they have the greatest potential interaction. The user should be able to customize how many (k) target features to consider for each input feature, as well as the coefficients for input weights, target weights, and the friction of distance.

Gravity model specification

The gravity model of spatial interaction model should be able to take the following inputs (based on class discusson):

And create the following output:

Additional advanced options for the model should include:

Gravity model challenges

Model for preprocessing Homeland Security hospital data

To be fully reproducible, these steps of data preprocessing should be encoded in a model:

Model to preprocess target features

In many cases, target features may need to be aggregated, and it will most often make sense to aggregate them by the same spatial units used for the input features. In this particular case, it’s the problem of grouping clusters of hospitals by town.

The model should be able to take the following inputs:

And create an output in which target features have been grouped by the input polygon feature in which they are found, and the group has:

Data sources

Main Page