• No results found

Objective: Learn how to create contour shapefiles and hillshading; convert contours to Autocad and Google Earth (KML) formats.

1) We will be using an image file from Geobase.ca (already provided for this workshop. )(The image was obtained by:

a. Navigating to: http://www.geobase.ca/geobase/en/index.html

b. From the Data drop-down menu in the top right corner, selecting

Digital Elevation Data. Clicking on download. Then from Option 1 – Graphical Search, clicking on the area desired in the map to select it. To download these files, you must register a login and password for this site and then login to complete the download. These files contain elevation data in each pixel. This information can then be used to generate contour lines and create 3D images of the landscape cover. 2) In QGIS, click on the New Project icon, . Click on the Add Raster Layer

icon, , and navigate to the image file downloaded (/My Documents/Module_data/Module9/092g06_0100_deme.dem)

3) Using the Identify Features tool , click in several places on the screen on the gray image. Have a look at the information that pops up. The values you are seeing are elevation heights, or Z values. You might notice a wide range of heights. These are of the Vancouver area and so the heights vary quite a bit between the lowest and highest heights. We are now going to build contours

4) Before we get started, we need to enable the Raster Terrain Analysis plugin. Refer to Module 6 for enabling this plugin, or view the document

QGIS_plugins_install.docs. Remember to not only download the plugin, but you need to also enable it.

©

Marcel Fortin, GIS and Map Librarian, University of Toronto Libraries 2012

65 5) To give our area some perspective, we will add a Web Mapping Service (WMS)

to our map. WMSs are useful when you want to view an area but don’t

particularly want to download any specific features for that area. The WMS is basically georeferenced data that is converted to image formats on the fly by the spatia queries of your software. The B.C. government’s WMS addresses can be found here: http://www.data.gov.bc.ca/dbc/geo/wms/index.page

6) To enable a WMS, click on the WMS icon .

7) In the Add Layer(s) from a Server pop up box, click on New.

8) In the Create a new WMS connection pop up window, give your connection the Name BC and enter the following url in the URL box:

http://openmaps.gov.bc.ca/mapserver/admin-boundaries?version=1.1.1 and click on OK.

©

Marcel Fortin, GIS and Map Librarian, University of Toronto Libraries 2012

66 9) Once back in the Add Layer(s) from a Server box, select your BC WMS and

click Connect.

10) In the list of layers accessible to you, select 39 TA_MUNICIPALITIES_O and click on Add, and then Close.

11) You should now see the Greater Vancouver Area municipalities mapped out in your screen view

12) To make contours out of the DEM data, select the Raster menu, then

©

Marcel Fortin, GIS and Map Librarian, University of Toronto Libraries 2012

67 13) In the Contour box, click on Select… and give your shapefile of contours the

name of contours.shp. Select 10.00 (metres) interaval for your contours intervals. Click on the Attribute name option and give the attribute name

ELEVATION. Click on the Load into canvas when finished option and click on

©

Marcel Fortin, GIS and Map Librarian, University of Toronto Libraries 2012

68 14) Once the contours have been generated, click on OK in the Finished pop up,

and then Close in the Contour window.

15) Turn off the DEM layer in your Table of Contents. Your map should look similar to this image below.

©

Marcel Fortin, GIS and Map Librarian, University of Toronto Libraries 2012

69 17) Using the Raster menu, select Terrain analysis and then Relief

18) In the Relief pop up window, give your new relief image the name relief.tif, select Add result to project option, and click on Create automatically under the Relief colors option.

©

Marcel Fortin, GIS and Map Librarian, University of Toronto Libraries 2012

70 20) You should now have an image similar to this one below

21) Zoom into a hilly area of your map and move the contours above your relief image

22) Click once on the Contours layer in your Table of contents. Using the Labeling

tool (or, LayerLabeling), label your ELEVATION field in your contour layer.

©

Marcel Fortin, GIS and Map Librarian, University of Toronto Libraries 2012

71 24) If you would like to export your contours to autocad format, simply right-click on

the contours layer in your table of contents and save as DXF format as below.

25) Note that at this time, the ELEVATION field of your attribute table for the contour layer does not get transferred over to your CAD file.

26) Click on OK on the Coordinate Reference System Selector box after having selected the NAD83 EPSG:4269 Projection system

27) You can also save your contour layer to Google Earth (KML) format using the same method

©

Marcel Fortin, GIS and Map Librarian, University of Toronto Libraries 2012

72 28) To do this, in the Save Vector layer as.. select Keyhole Markup Language as

a Format. box provide the name contours.kml to your layer, change the CRS (projection information) using the Browse button. Select WGS84 (use the filter to easily find it) in the pop up window.

29) Turn off the Skip attribute creation and the Add saved file to map options. 30) In windows explorer, navigate to where you saved you KML file, and double-click

Related documents