qgis outcrop prediction example problem · web viewan elevation grid is needed to calculate the...

27
QGIS Outcrop Prediction Example Problem Introduction This document discuss the step-by-step example of using QGIS with certain “plugin” extensions to process a outcrop prediction geologic map starting with a digital elevation raster and the orientation of the bottom and top contacts of a inclined tabular geologic unit. A Python application will create the planar elevation raster files based on the attitude of the top contact and a single position on the map where the attitude was observed. The bottom contact raster is derived from a knowledge of the thickness of the unit. Setup and Starting Data You will need an installed and working copy of QGIS 2.18 or above along with the following plugins: 1. CadTools 2. Contour Plugin 3. Coordinate Capture 4. Digitizing Tools 5. XYtools Note that some of these may be installed automatically when QGIS is installed. You can activate/check the available plugins through the “Plugins > Manage and Install” menu selection. You can download the starting data from the below web site: http://www.usouthal.edu/geography/allison/gy461/ gy461_project_resources.htm Look for the section titled “Outcrop Prediction” and then download from the below links: 1. OPexample_QGIS_start.zip {starting data files}

Upload: votram

Post on 07-May-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

QGIS Outcrop Prediction Example Problem

Introduction

This document discuss the step-by-step example of using QGIS with certain “plugin” extensions to process a outcrop prediction geologic map starting with a digital elevation raster and the orientation of the bottom and top contacts of a inclined tabular geologic unit. A Python application will create the planar elevation raster files based on the attitude of the top contact and a single position on the map where the attitude was observed. The bottom contact raster is derived from a knowledge of the thickness of the unit.

Setup and Starting Data

You will need an installed and working copy of QGIS 2.18 or above along with the following plugins:

1. CadTools2. Contour Plugin3. Coordinate Capture4. Digitizing Tools5. XYtools

Note that some of these may be installed automatically when QGIS is installed. You can activate/check the available plugins through the “Plugins > Manage and Install” menu selection.

You can download the starting data from the below web site:

http://www.usouthal.edu/geography/allison/gy461/gy461_project_resources.htm

Look for the section titled “Outcrop Prediction” and then download from the below links:

1. OPexample_QGIS_start.zip {starting data files}2. PlaneTrendSurf.py {python program}

Create a folder on a disk and save these files to that working folder. It is advisable to put any files created during this exercise in that same folder. If you are working on a workstation on campus note that most don’t allow the permanent storage of student files on the hard disk so it is advisable to create a folder on your flash drive and work in that folder periodically saving results to that folder.

Getting Started

Page 2: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Open QGIS form the desktop or start menu. Select “Project > New” from the main menu to create a blank map. Set project coordinate system using the “Project > Properties > CRS“ menu selection. Set the coordinate system to UTM NAD27 zone 16.

Load the following files using either the “Layer > Add layer > add vector layer”:

1. SurveyPts {points}2. Border {line}3. Bedding {points}4. Exprob_MineArea {polygon}

After adding the above layers you should see the map border, a number of survey points, and one bedding data point. Right-click on the “SurveyPts” layer name, select “Open Attribute Table” and view the organization of the survey point data. The x and y coordinates are UTM zone 16 in meters, and the “Z_coord” field is elevation in meters. Close the attribute table and then open the attribute table for the “bedding” layer. Note that in addition of the x,y,z coordinates of the data point, the azimuth of the strike and dip amount and direction for bedding outcropping at that point are in the table.This is the top of the unit to be mapped.

Generating the Elevation GridAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located survey data. To generate the grid select from the main menu “Processing > Toolbox” which should open a “Processing Toolbox” window (be aware that it may already be open). Find the “SAGA” modules and expand the “Raster Creation Tools” group. Find and run the “Multilevel b-spline interpolation” module and fill in the dialog window as in Figure 1. Note that the grid cell size is set to 1.0. After successfully running this routine an elevation grid will be created and added as a layer to your project. Rename this grid to “Elevation”.

Generating the Top and Bottom Contact Elevation GridsThe python program “PlaneTrendSurf.py” will be used to generate the planar top and bottom contact grids. The input file for the program is described below:

---------------------------------------------------------------------------------------------------------

Line 1. trend and plunge degrees of the true dip vector (trend in azimuth format) (use “90.0, 40.0”).

Line 2. Elevation (Z value) of the measured attitude. (use “110.0”).

Line 3. "X,Y" coordinates of the position of the attitude measurement (use "500165.0, 3000085.0").

Line 4. SW corner (lower left) "X,Y" coordinates of the calculated raster image. (use “500000.0, 3000000.0")

Page 3: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Line 5. "Columns,Rows" in calulated raster (use "195, 145").

Line 6. Grid spacing between rows and columns of raster grid (use "1.0").

File name: ProbEx_top_in.txt

90.0, 40.0

110.0

500165.0, 3000085.0

500000.0, 3000000.0

195, 145

1.0

Output: ESRI raster file with following structure:

Line 1: "ncols=" {number of columns in raster grid}

Line 2: "nrows=" {number of rows in raster grid}

Line 3: "xllcorner=" {x coordinate of the lower left (SW) corner of the grid}

Line 4: "yllcorner=" {y coordinate of the lower left (SW) corner of the grid}

Line 5: "cellsize=" {cell size spacing between columns and rows}

Line 6: "nodata value=" {value that represents no data at grid node}

Line 7: 1st z value

Line 8: 2nd z value

Line (ncols * nrows + 6) : (ncols * nrows) z value

File name: ProbEx_top_grd.txt

---------------------------------------------------------------------------------------------------------

You can use “Notepad” or any similar text editor to create the input file. Just remember that comas are used to separate two values that occur on the same line, as in line 3 that contains the x and y

Page 4: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

coordinates of the outcrop point. This means that you cannot use comas within the x or y coordinate number.

The input file for the bottom contact – “ProbEx_bot_in.txt” in this example – will be identical to the top contact input file except that the elevation will be a lower value based on the thickness of the tabular unit:

d = t / cos(δ)

where d represents the decrease in elevation, t is the thickness of the tabular unit, and δ is the dip angle. For this example the thickness is 12.75m therefore:

d = 12.75 / cos(40) = 16.6m

The “ProbEx_bot_in.txt” file should appear as below:

90.0, 40.0

93.4

500165.0, 3000085.0

500000.0, 3000000.0

195, 145

1.0

Note that the only difference between the input files is the adjusted elevation on line 2. Proceed to create the ASCII elevation rasters “ProbEx_top_grd.txt” and “ProbEx_bot_grd.txt” from the above input files.

From within QGIS use “Layer > Add Layer > Raster Layer” to add the “ProbEx_top_grd.txt” and “ProbEx_bot_grd.txt” files as 2 layers. Both of the grids will appear the same because they are parallel planar surfaces. The top contact surface grid is displayed in Figure 2. Note that the “Identify Results” windows shows a “click” near the bedding data point on the top contact surface grid, and it is near 110 elevation as it should be. Also note the pattern of the grid – decreasing in elevation from west to east along constant elevation color bands running north-south parallel to strike. At this point it would be advisable to check the bottom contact before proceeding to the next step. The bottom contact should be 16.6m below an equivalent (x,y) point on the top contact.

Page 5: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Create the Residuals by Subtracting the Elevation from Top and Bottom Grids

Residuals are calculated by subtracting the elevation grid from the top or bottom grid to produce “top_resid” and “bot_resid” raster grid feature classes respectively. Both of these rasters have the following characteristics:

Grid Node Geometry

> 0.0 Contact is above topographic surface therefore the strata below the contact is exposed.

= 0.0 Contact outcrops at this point.

< 0.0 Contact is below topographic surface therefore the strata above the contact is exposed.

Note that if you symbolized all values < 0.0 with a blue color, and values > 0.0 with red, and 0.0 pixels black you would have a basic geologic map with blue representing the strata above the contact outcropping at the surface, red would be the outcrop of the strata below the contact, and the black pixels would trace the contact itself.

At this time run the “Raster > Raster Calculator” selection that will display the window dialog in Figure 3. Fill in the dialog as indicated to produce the “top_resid” top contact – elevation residuals grid.

Figure 4 displays the top contact grid residual “top_resid” in a gray-scale color scheme. Note that in the “Identify Results” window a left-click near the bedding data point yields a residual near zero at the outcrop point.

Reclassify the Residuals The residual rasters will be reclassified so that values <= 0.0 are assigned a value of 1, and values > 0.0 are assigned a value of 2. After this step both “top_reclass” and “bot_reclass” will have the following characteristics:

1Grid Node Value Reclassified Value

< 0.0 1 (strata above contact exposed)

>= 0.0 2 (strata below contact exposed)

Find the SAGA “Raster Tools > Reclassify” tool in the Processing menu or Processing Toolbox window. Figure 5 contains the window dialog settings for reclassifying the “top_resid” to make the “top_reclass”. Make sure that you set the method to “Range”. For minimum value you just need to set a value that is guaranteed to be below the minimum residual value. The “top_reclass” map is displayed in Figure 6. Note that it consists of only two values, 1 for the outcrop of strata above the top contact surface, and 2 for strata below the contact.

Page 6: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Add the Two Reclass RastersThis simplification will allow the top and bottom rasters to be “added” together to produce a raster that has the below characteristics:

1 Top Grid + Bottom Grid = Composite Grid

1 1 2=younger strata exposed

(strata above top and bottom contact)

2 1 3=intermediate strata exposed

(strata below top contact, above bottom contact)

2 2 4=older strata exposed

(strata below top and bottom contact)

Note that the condition of the top grid node = 1 and the bottom grid = 2 at the same map position is not possible if the top contact is structurally above the bottom contact. The composite grid separates the older, intermediate, and upper stratigraphic units into three unique values, therefore, it represents the geologic map in raster form.

Use the raster math dialog to add the “top_reclass” and “bot_reclass” to produce “Litho_raster”. Figure 7 displays this composite as the raster geologic map. Note that the lower value pixels are stratigraphically younger therefore the colors in the “layer s panel” window are in proper stratigraphic order.

Converting the Raster Geologic Map to Lithologic PolygonAlthough the “Litho_raster” is a raster geologic map there are several reasons why you may want to convert the raster into a polygon feature class. For example, if converted to a polygon feature the area of each polygon entity is automatically calculated whereas a fairly complex analysis would have to be processed to yield the same value with a raster. The boundaries between polygons are smoother and give a better quality to plotted maps.

The first step in producing a true polygon topology from the “Litho_raster” layer is to generate contact lines by “contouring” the raster values contained in “Litho_raster. Because this raster contains 2, 3, and 4 as raster values we will generate contours at 2.5 and 3.5. Start the GRASS GIS 7 command “Raster > r.contour.step”. The window dialog for this procedure is displayed in Figure 8 – fill in values as indicated. The contour values generated will be jagged because they follow the raster pixel boundaries so the contours need to be “generalized” – run the GRASS 7 vector procedure “v.gneralize.simplify” using the “litho_contours” as input. The window dialog is displayed in Figure 9 – the output smoothed lines are named “contacts”.

Page 7: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

The next step combines the map border line with the new contacts into a single line geometry layer named “union”. From the main menu select the “Vector > Geoprocessing > Union” option. This activates the window dialog in Figure 10 – fill it in as indicated. You should now have a new layer active that combines the border with the contacts. To generate the polygon layer “Lithology” you need to create polygons from the “Union” line boundaries using the Processing Toolbox selection “QGIS Geoalgorithms> Vector Geometry Tools> Polygonize”. Figure 11 displays the window dialog with settings for this step.

At this point it would be nice to assign different colors to each polygon (younger, middle, older strata) based on a text field value. Right-click on the “Lithology” name in the “Layers” window, and then select “Attribute Table”. The attribute table will display just one field, the “id” field. Add a “Lithology” text field by first toggling on the edit mode (left pencil icon), and then click on the “add field” icon. Use the following parameters for the new field:

Name: “Lithology”

Type: text

Length: 15

After creating the field highlight the row by clicking on the row number, and using the highlighted polygon type in the names “younger”, “middle”, or “older” depending on the polygon position. Now right-click on the “Lithology” layer name again and select “properties”. Then select the “Style” tab. Figure 12 contains the window dialog filled out for this layer style – see if you can fill it out the same way. Work from top down being sure to select “Categories” and the “Lithology” column. Then select “Classify” to list all unique values in the “Lithology” field. You can double-click on the color squares to change them to specific colors.

If you need to obtain the value of the perimeter or area of any polygon in a polygon topology you will need to add a numeric “area” field to the “Lithology” attribute table. Proceed as you did before to add the “area” field but use these for the new field:

Name: “area”

Type: real

Length: 15

Precision: 1 (decimal places)

Now find the field calculation query tool in the attribute table (activate edit mode) and start the calculation query dialog. Look for the geometry variable “$area” to add to the query and then click “OK” to run. The field will automatically fill in with the area values in square meters. Figure 13 contains the calculation query dialog window.

Page 8: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Composing the Final Map ProductQGIS can easily add the final touches to the geologic map. First, use the “Project > New Print Composer” to name a layout and then open a blank layout window. Use the “Layout > Add Map” to add a map frame to the layout. Proceed from this same menu to add:

1. North Arrow {Add an arrow and then a large “N” label}2. Scale Bar3. Title {Label}4. Legend

You should wind up with something similar to Figure 14.

Page 9: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

CalculationsWith the lithologic polygon feature you can do a variety of simple calculations:

Problem 1: What is the map area of the:

Younger stratigraphic unit? 3792.4 m2

intermediate stratigraphic unit? 5732.7 m2

older stratigraphic unit? 18998.0 m2

Solution: Use the “Identify” tool to click on the unit polygon. When the results window is displayed look for the value of “area”. The area units will always be the square of the unit used by the map coordinate system – in this case UTM that uses meters. Recall that the “area” field of the Lithology polygon layer was added in a previous step, and was set to the value of “$area” with a calculation query.

Problem 2: Assuming the intermediate unit is composed of coal what volume in m3 could be extracted from the mine area? 13,200.3 m3

The volume of material between the top and bottom contacts of the intermediate unit can be calculated by first estimating the map area of the mine, and then multiplying that value by the vertical depth between the top and bottom contact. In effect multiplying the map area by the thickness of the unit.

Step 1: Find the area of the mine polygon by right-clicking on the “Exprob_MineArea” layer and selecting “attribute table”. The area of the single polygon will be one of the field values in the table (795.2m2).

Step 2: Calculation of the depth from the top to the bottom contact is easily done from the equations for the planar trend surfaces output by “PlaneTrend.py”:

Bottom: C0 = 419781.7; C1 = -0.839; C2 = -1.490

Top: C0 = 419798.3; C1 = -0.839; C2 = -1.490

Notable is the fact that C1 and C2 are the same for both planar contacts but this must be true if both contacts are parallel. The only difference in the 2 equations is the Z intercept that differs by a value of 16.6m. This is the vertical depth from the top to the bottom contact, therefore the volume is:

795.2 m2 * 16.6 = 13,200.3 m3

Problem 3: If the younger stratigraphic unit consisted of sand and gravel how much material (m3) could be mined from the mine area? 9702 m3

Step 1: Use the “Raster > Extraction > Clipper” to clip out the section of the elevation grid that corresponds to the mine area. In the dialog use these parameters:

Input file: Elevation

Page 10: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Output file: Mine_Elevation

Mask layer: Exprob_MineArea

(check the “crop to extent of the crop line}

This will extract the portion of the elevation grid that corresponds to the mine area on the map. Use the same extraction process to produce Mine_Top, the portion of the top contact that falls in the mine area.

Step 2: Use the “Raster >Raster Calculator” to calculate the following:

Diff1 = Mine_Elevation – Mine_Top

Make sure that you use band1 (@1) in both cases. Also set the extents of the “Diff1” result to the “Current layer extent”. You should realize that the result of this calculation represents the depth from the surface down to the planar bottom of the younger stratigraphic unit.

Step 3: Right-click on the “Diff1” layer name in the layer window and select “properties”. Scan the list to find the x and y dimensions of the raster. Also find the “pixel” area size. The map area of the mine equals:

X dimension * y dimension * pixel area

If the above value is multiplied by the average value of the pixel depth values the volume of the sand and gravel will result. Scan the metadata list for the average value of the raster. The final calculation is:

18 * 44 * 1m * 12.25m = 9702 m3

Page 11: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 1: Multilevel B-spline Interpolation window dialog.

Page 12: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 2: Appearance of the top contact elevation grid calculated by the PlaneTrendSuf program.

Page 13: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 3: Raster calculator setup for generating the "top_resid" residuals grid.

Page 14: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 4: Appearance of the "top_resid" grid.

Page 15: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 5: Window dialog for the "Reclassify" procedure.

Page 16: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 6: Appearance of the "Top_Reclass" map.

Page 17: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 7: Results of adding the "top_resid" and "bot_resid" to produce ""Litho_raster".

Page 18: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 8: GRASS 7 Raster procedure "r.contour.step" window dialog.

Page 19: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 9: GRASS 7 window dialog for "v.generalize.simplify".

Page 20: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 10: Union window dialog for merging together the border and contacts layers.

Page 21: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 11: Dialog window for "Polygonize" to produce the "Lithology" polygons.

Page 22: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 12: Style settings for the "Lithology" polygon layer.

Page 23: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 13: Calculation query for the "area" field of the "Lithology" polygons.

Page 24: QGIS Outcrop Prediction Example Problem · Web viewAn elevation grid is needed to calculate the outcrop prediction so as a 1st step we will generate a grid from the randomly located

Figure 14: Example problem map composition layout.