Buffer Exercise
Data Collection
Pre-requisites:
- Setup
- Basics
Objecties:
- Perform simple spatial function on vector data
- Further understand projections
Exercise: Why we should all check our data
Why we should all check our data beforehand
Inspecting our data is before we attempt to perform any calculation, analysis, or spatial function is very important. To prove this, we are going to perform a simple buffer analysis. Spatial analyses are explained in Spatial Analysis.
- Open QGIS and import faults_100k.shp through iRods:
/iplant/home/shared/aegis/Spatial-bootcamp/data-collection/faults_100k.shp
Or download, unzip, and Add Vector Layer :
fault_100k.zip
- Buffer fault lines to 100m:
- Menu Bar > Vector > Geoprocessing Tools > Buffer(s)
- Configure inputs as follows:
Input vector layer: fault_100k
Buffer distance: 100
Output shapefile: fault_buffer_100m.shp
Add results to canvas: (Checked)
Click OK to perform analysis, Close to exit the tool
- Zoom in to a buffer, close enough to see the width
- Open the meaure tool
- Measure the width of the buffer. Notice how the total width is only about 62 meters, or 200 feet (buffers both sides of line; 100 feet X 2 = 200 feet). Current map units are determined by the CRS, in this case EPSG:2927 is in US feet and we need meters. Simply changing the CRS in Project Properties does not give us the correct results- this is still measured from EPSG:2927 US feet.
Important:
There are two methods to perfoming a buffer analysis on our shapefile. The problem here is that our CRS is EPSG:2927 (in US feet) and the buffer distance is based on map units (still US feet). The two methods are: convert 100 meters to US feet and use this value in the buffer analysis while maintaining EPSG:2927 (in US feet); OR, reproject the layer thus creating a new file with a CRS in meters, and then reprojecting back to EPSG:2927. We’ll go with the former.
- Now we need to perform the buffer analysis with the correct method. Remove the incorrect buffer layer: fault_buffer_100m.shp
- Convert 100 meters to feet… = 328.084 feet.
- Again, open the buffer tool: Menu Bar > Vector > Geoprocessing Tools > Buffer(s)
- Buffer fault_100k with correct distance:
- Configure inputs as follow:
Input vector layer: fault_100k
Buffer distance: 328
Output shapefile: fault_buffer_100m.shp
Add result to canvas: (Checked)
Click OK to run (overwrite necessary), and CLOSE to exit tool
Reminder:
Buffer distance = 100 meters * 3.28084 feet = 328.084 feet
1 meter = 3.28084 feet
- Configure inputs as follow:
- Confirm 100 meter buffer on faults:
- Open measure tool and confirm 200 meter total width (100 meters * 2 = 200 meters)
- Open measure tool and confirm 200 meter total width (100 meters * 2 = 200 meters)
You’ve now tackled a large issue related to map units and projections. Not necessarily the buffer, but the consequences of not knowing understanding your data before working with it.
It’s always good practice to check the metadata before working with it.
You do not need to save this project or the data.