gy301 geomorphology lab 5 topographic map: final gis map ... · lab 5 topographic map: final gis...
Post on 05-Oct-2020
7 Views
Preview:
TRANSCRIPT
GY301 Geomorphology Lab 5 Topographic Map: Final GIS Map Construction
IntroductionThis document describes how to take the data collected with the total station for the campus
topographic map project and use QGIS 3.x to construct the map for each group. Each group may turn in
a single map – all members of the group will the same raw grade before peer assessment. QGIS is the
GIS application software that will be utilized to compose the map, and then as a final step conduct a
hydrologic analysis to determine the critical points around LSCB and the Library where stream erosion is
most likely to be a problem. QGIS is open source (Free!) and cross‐platform so you should be able to
complete the map and hydrologic modelling on a Windows, MacOS, or Linux system without major
problems. ArcGIS may also be used if preferred. The GIS workstations in LSCB 333 and 146 have both
ArcGIS and QGIS installed for those who do not have their own computer system. QGIS may be
downloaded at:
https://www.qgis.org/en/site/forusers/download.html
Use/include the following on the GIS final map:
1. Scale of 1:2,500.
2. Contour Interval of 0.2m, labeled index contours every 1.0m.
3. Post map of data points (red crosses).
4. Title = “Total Station Project: Group {XX}, Fall Semester 20{XX}”.
5. Group member names and date due in lower right corner.
6. The corners of the Library, LSCB, LSCB Biology Lecture, and new Administration Building
(Meisler) should be identified as points on the survey. In QGIS draw polygons that connect
these points.
7. Survey the trees 1‐9 that are the “white” course used in the pace & compass project.
8. Add UTM grid to map frame with 100m spacing.
Step1:Createprojectfileandaddaerialbasemapandotherfeatures.
First, download the starting files from the “resources” section of the online GY301 web site. Currently
this is the “CampusTopoProject.zip” file, but check with your instructor to verify. This file should be
“unzipped” in the folder where you intend to work on this project. There will be many files created but
basically the following features will be represented by these files:
1. A georeferenced raster image file of the USA campus that used the UTM NAD27 coordinate
system.
2. A shape file of the boundary of the mapping area.
3. A shape file of the mapping area polygon that corresponds exactly to the boundary line.
4. A shape file of several key buildings on campus that are to be surveyed during the project.
5. A shape file of the benchmark coordinates (ST01‐ST20) that were used to resection the total
station during data collection.
6. A partial data set surveyed of a portion of the mapping area that will serve as an example file
(GroupX.xls)
In addition to these files you will need to have access to your spreadsheet of downloaded survey data
collected during the project formatted so that you can refer to an “X,Y,Z,ID” column in the spreadsheet
where “X,Y” are the UTM easting and northing coordinates, “Z” is the elevation of the survey point in
meters, and “ID” is the point label. I will be using the “GroupX.xls” file as an example in class but you
should be using your downloaded Total Station data.
To start QGIS find the QGIS icon on the desktop or in the “Start” menu (Windows). Choose the “QGIS
Desktop” application (with or without “GRASS”). The main window will open – find the “add raster”
button on the left button bar, or from the menu select “Layer > Add raster layer” to add the aerial base
map. You should choose the “USA_campus.tif” file. The aerial of the campus should now display in the
main window.
The remainder of the files will be “vector” shape files so use the “Add vector layer” icon or menu item to
add these files:
1. Boundary.shp (after adding “zoom” to this layer)
2. ProjectArea.shp (make 50% transparent so you can see through it)
3. Buildings.shp
4. Benchmarks.shp
You should now have a map that appears similar to Figure 1.
It is important to check a few of the project file properties at this point to make sure everything is
properly set before trying to add the survey data. First, let’s make sure that the coordinate system (CRS)
is defined for the project – select from the menu “Project > Project Properties”. Figure 2 displays the
window dialog that shows UTM NAD27 zone 16 selected as the project coordinate system. Note that
there are a lot of possible coordinate systems – use the “filter” and the keyword “UTM” to narrow your
choices.
Step2:Addsurveydatatoprojectfile.
The next will add the survey data stored in a spreadsheet to your project file so that it can be used to
calculate a digital elevation model (DEM) that may later be contoured. Before starting this step verify
that your spreadsheet file is in the working folder, and that it contains all of your data. Remember that
the benchmarks that I give you can be used as additional data points. In addition, make sure that your
spreadsheet has meaningful “header” labels (i.e. “UTM_X”, “UTM_Y”, “Elev_m”, etc.) so that you can
easily pick the correct column when prompted by QGIS. The QGIS system can directly import a CSV
(comma separated values) file that Excel can export. At this time open your spreadsheet that contains
the survey data and use “File > Save As” to save the spreadsheet as a “.csv” file. Make sure you save the
file to your working directory. This file is an ASCII text file so if you are curious you can view it with a text
editor like “Notepad”, or alternatively you can directly open it with Excel. I would maintain the Excel file
with your up‐to‐date data because it has some powerful editing functions that come in handy at times.
Figure 3 shows the first 45 rows of the “ExampleData.xls” file that I will be using for this example
project. Note the header labels in the first row.
To import the “.csv” file choose the menu option “Layer > Add layer > Delimited layer“. Click on the
open directory button and browse the directory tree until you find your CSV file (.csv). Select the file
name and then set the information as in Figure 4. You should now see your data plotted properly on the
map‐ check with your instructor if this does not occur. Check that all of the data was imported correctly
by opening the layer attribute table by highlighting the layer name, right‐clicking on the name, and then
select “Open attribute table”. The data should appear similar to Figure 5.
Step3:Interpolatinganelevationsurface(DEM)fromthesurveydata.
One of the primary goals of the exercise is to produce a digital topographic contour layer, however, all
computer contour‐generating algorithms need a DEM to produce usable results. A DEM is nothing more
than a regularly‐spaced (x,y,z) grid where (x,y) are the geographic coordinates of each grid node, and (z)
is the value of elevation at that location. The survey data does not qualify as a DEM because the
locations are arbitrary, and not part of a rectangular grid pattern. The survey points must be
“interpolated” into the DEM grid. We will use the inverse distance weighted algorithm to do the
interpolation because it tends to make a smooth surface much like natural topographic surfaces.
At this point open the “Processing > Toolbox” menu option. Make sure the “Advanced Interface” is
selected at the bottom of the window that opens. You should see a category of processing options
labeled “SAGA”. Expand this tab. Select “Raster Creation Tools –> “Multi‐level B‐spline interpolation”,
and then double‐click. In this windows dialog there are a lot of options but for our purposes only 3 items
need to be edited:
1. The layer to be interpolated should be set to the survey data shape file, in this example
“ExampleData”.
2. Select is the attribute value to use as elevation: this should be “Elev_(m)” (or whatever you
named the elevation attribute).
3. The grid size should be set to 1.0 meters. This will be the resolution spacing of the DEM along
the x and y axes.
4. Specify a permanent file name for the grid.
Figure 6 displays the full window dialog for Multilevel B‐spline interpolation with the above changes in
effect. Note that in this case we will specify a permanent grid file. Use a descriptive name such as
“ElevGrid.sdat” or something like that so that you can later determine what was used to create the grid.
Make sure that you save it to your working folder. This completes the DEM creation step. Check the
appearance of the grid file to make sure it makes sense relative to your data. Note that you may see
some error messages when you run the gridding procedure. These can be ignored as long as the grid
appears reasonable.
Step4:GeneratetheTopographicContours.
We will use the SAGA module “Vector <‐> Raster > Contours” processing tool to generate topographic
contours from the DEM. Figure 7 contains the settings for the window dialog. Check the resulting
contours to make sure that they are “reasonable” relative to your data. The geometry of the contours
should appear similar to Figure 8.
Note that the contour interval is 0.2m so index contours should be every 5 * 0.2m = 1.0m. Remember
that on topographic maps index contours should be bolder than other contour lines, and should be
labeled.
To control the generation of index contours and to label them we will create two additional columns
(fields) in the contour line attribute table:
Name Type Values
1. Index Integer 1=Index;0=Not index
2. Label String Contour value label string (blank if it is not an index contour)
Open the attribute table for contours and add the above columns. Run a calculation query with the
“field calculator” as in Figure 9. You should see all index contours (i.e. 36.0, 37.0, 38.0, ….) take on a
value of 1, with non‐index contour values set to a zero value.
In order for the index values to have an effect you need to “classify” the contours based on the index
attribute value. Right‐click on the “contour lines” layer and then choose “properties”. Use the settings in
the Figure 10 window dialog to classify the contours based on the index value. The index line width was
set to use the map scale width of 0.7m and the non‐index contours 0.3m. The color was set for both to
brown as is typical for topographic contours.
Next, we will use a calculation query to build labels for the contours: a string equal to the numeric
elevation value for index contours, but blank (‘ ‘) for non‐index contours. Figure 11 contains the window
dialog from opening the field calculator tool on the “contour lines” layer attribute table. After running
the query, right‐click on the “contour lines” layer name, and then select “properties”. Configure the
window dialog that opens as per Figure 12. Basically you are turning on the labeling for the “contour
lines” layer using the “label” attribute as the source of the label. The Figure 13 map displays the contour
lines with labels over the mapping area.
Step5:HydrologicModelling
As a final step let’s use the DEM already generated to model the hydrologic drainage around the project
area. The ultimate goal will be to take the drainage map outside and see how well it may correlate with
areas in the mapping area that are suffering drainage and erosion problems. There are many hydrology
modeling tools built into QGIS, however, we are going to use one of the simpler models: SAGA – Terrain
Analysis – Hydrology > Catchment area (flow tracing). The output of the model will be a raster image
that predicts where stream drainage will form in the various catchments in the mapping area.
Make sure the “Processing Tools” window is open and then expand the SAGA collection. Expand the
“Terrain Analysis – Hydrology” section and look for “Catchment Area (Flow Tracing)”. The Figure 14
graphic shows the window dialog for this processing tool – basically you just input the DEM as the
source. Allow it to make a temporary output file. All of the options are set to the default values – just
make sure the input source is the DEM. You may encounter some minor error messages that can be
safely ignored after the model completes. You will have a grayscale image added to the project that
represents the drainage patterns in the mapping area. Save this image to the file
“SAGA_catchment_ft.tif” in your working folder (remember that it is just a temporary file presently). We
are going to enhance this grayscale image with color : right‐click on the image layer name and select
“properties”. In the “style” area change the render type to “single‐band pseudocolor”. Click the
“Classify” button to add color levels. Figure 15 displays the settings in the window dialog. The highest
values (blue) indicate the stream channels. We will take these maps outside to see how well the
correlate with real erosional problem areas.
Step6:Printingresults
I want each group to print a hard copy map of the start data with DEM and contours and survey points
plotted (see Figure 16). Do not have the stream catchment raster on for this map. In Figure 16 you will
see the map in a cleaned up state:
1. Layer names have been spelled out, as have contour categories.
2. The grayscale DEM has been changed to a single‐band pseudo color with colors arranged at
equal elevations increments. See if you can do the same in the “properties > style” section of
this layer. Note the following:
a. Initially after changing from single‐band grayscale to color you need to set the min=35
and max = 60 to take in the full range of the DEM. Your values may be somewhat
different depending on the data you collected‐ try to set a min an max that is a multiple
of 5m.
b. The color “ramp” selected was “spectral”.
c. Select mode = “equal interval”.
d. Classes = 6 (or whatever number gives to a 5m interval)
e. Note that the “inverted” checkbox is checked to make the maximum elevations a red
color.
f. You should have a setup that looks like Figure 17.
g. Note that it took some effort to setup the style for the DEM layer. You can save the
“Style” to a file to be re‐used later in case you do a similar DEM and want the same
settings‐ see the “Style” button.
You will also note that the topographic contours have been “clipped” to the mapping boundary. There is
an automatic way to do this in the “Vector > Geoprocessing Tools > Clip” menu. Try to accomplish this
on your own using the “Project Area” polygon as the clipping boundary. It is probably best to let the
clipping result default to a temporary result, verify that the result is what is desired, and then right‐click
on the layer name and select “Save As” to save to a file in your working directory. Don’t forget to
remove the temporary layer from the project. Figure 18 contains the window dialog for the “clip”
operation. This is where saving the layer style can pay dividends because it took some time to create the
style symbology for the contours layer. Go to the “Properties > Style” settings for this layer and save the
style to a “contours.qml” file. When you generate the clipped contours layer you can set the style by
loading the “contours.qml” file from the “style” button.
Make sure your final map is “cleaned up” like Figure 16 before getting setup for printing.
In the QGIS system to use the “Project > New Print Composer” to create a print composition window.
You use the composer to add a legend, scale bar, etc., to complete the map so you must become
familiar with how this works to make the final map. When you make a new map composition you will
first be asked for the name of the map composition – use a name like “Layout1”. You will then see a new
window activated where the final map will built. Follow these steps to build the map layout:
1. Use the “Layout > Add Map” to drag a rectangle area for the map frame. Use a RF of 1:2500
to set the scale of the drawing. Leave enough room for an upper title, lower scale bar, and a
legend in the right side of the layout. The page layout should be landscape. You may need to
use the “Move item content” to center the map in the frame.
2. Use the “Layout > Add Arrow” to insert a North Arrow in the upper left corner of the layout.
Use the “Layout > Add Label“ to insert an “N” below the arrow.
3. Use the “Layout > Add Scalebar” menu selection to add a scale bar centered below the map
frame.
4. Use the “Layout > Add Legend” menu selection to add a legend frame along the right side of
the layout. With the legend frame selected “uncheck” the auto‐update checkbox – this will
allow you to remove any unwanted legend items.
5. Select the main map frame and then scroll down the “Items” tab until the “Grid” item is
visible. Use the “+” button to create a new grid named “grid1”. Use an (X,Y) spacing of 50
meters for the grid. Turn on the “Draw coordinates” checkbox, and then select a “Custom”
format. Use the following expression in the expression window: “format_number(
@grid_number ,0)” to set the number of decimals to 0.
You should have the map layout similar to Figure 19. Add your group number and the members of the
group in the lower right with the label tool and then use “Project > Print” to make a hard copy to turn
in.
Figure 1: QGIS map window after inserting given vector and raster files.
Figure 2: Setting the project coordinate system (CRS=UTM NAD27 zone 16).
Figure 3: Format of the example Excel data file.
Figure 4: Window dialog for importing CSV survey data file to the project as points.
Figure 5: Attribute table for imported CSV survey data.
Figure 6: SAGA Multilevel B‐spline interpolation window dialog settings for creating the DEM from survey data.
Figure 7: Contour generation dialog window for SAGA: Vector <‐> Raster > Contour lines.
Figure 8: Geometry of example data topographic contours. Grid is based on the SAGA multi‐level B‐spline algorithm.
Figure 9: Calculation query setup for contour "Index" field.
Figure 10: Categorizing the contours lines into index and non‐index symbology with the "index" attribute.
Figure 11: Field calculation for the label field.
Figure 12: Label setup for the contour lines layer.
Figure 13: Appearance of map with contour lines labeled.
Figure 14: Window dialog for the SAGA Catchment area (flow tracing) processing tool.
Figure 15: Setting the style properties of the catchment raster.
Figure 16: Cleaned up version of the map prior to printing setup.
Figure 17: Window dialog setup for the DEM style.
Figure 18: Dialog window for the contours "clipping" operation.
Figure 19: Map layout for printing.
top related