An Excellent Tutorial for Nearest Neighbor Analysis using QGIS

GIS is very useful is analyzing spatial relationship between features. One such analysis is finding out which features are closest to a given feature. QGIS has a tool called ‘Distance Matrix’ which helps with such analysis. In this tutorial, we will use 2 datasets and find out which points from one layer are closest to which point from the second layer.


The topics covered by this tutorial are

Let’s get started. In this tutorial, we will walk through the process and answer this question. Given the locations of all known significant earthquakes, find out the nearest populated place for each location where the earthquake happened.

We will be using the Natural Earth Populated Places dataset along with NOAA’s National Geophysical Data Center’s Significant Earthquake Database.

Follow the instructions in this tutorial to import the Significant Earthquake CSV file to QGIS. Also open the Natural Earth populated places layer using Layer → Add Vector Layer.

In the screenshot, each green point represents the location of a significant earthquake and each blue point represents the location of a populated place. We need a way to find out the nearest point from the populated places layer for each of the points in the earthquake layer.

An Excellent Tutorial for Nearest Neighbor Analysis using QGIS

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

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