Exercise 03 Creating and Editing Shapefiles Assigned Feb. 2, 2018 Due Feb. 9, 2018

Similar documents
Exercise 04 Topological Shapefle Editing plus Importing and editing GPS data Assigned Feb. 9, 2018 Due Feb. 16, 2018

GIS Exercise 09 Mar. 23, 2018 Due Mar. 30 ArcGIS and Geologic Maps (updated version 2 instructions)

GGR 375 QGIS Tutorial

GIS Exercise 10 March 30, 2018 The USGS NCGMP09v11 tools

3. Map Overlay and Digitizing

Introduction to using QGIS for Archaeology and History Workshop by the Empirical Reasoning Center

In this lab, you will create two maps. One map will show two different projections of the same data.

Second Summer School on Digital Tools for Humanists. Instructions for the hands-on tutorial on GIS

City of Richmond Interactive Map (RIM) User Guide for the Public

ADOBE DREAMWEAVER CS4 BASICS

GIS LAB 8. Raster Data Applications Watershed Delineation

Introduction to Microsoft Excel

A Practical Guide to Using QGIS

Chapter 7. Joining Maps to Other Datasets in QGIS

Introduction to Distance Sampling. Automated Survey Design Exercises

Low Cost and Free Public Health Mapping Tools

Georeferencing Topo Sheets and Scanned Maps

Adobe Dreamweaver CS5 Tutorial

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010

Objectives Learn how to work with projections in SMS, and how to combine data from different coordinate systems into the same SMS project.

How to perform a quality check of a new dataset. QGIS Tutorials and Tips

Using Windows 7 Explorer By Len Nasman, Bristol Village Computer Club

Objectives Learn how to work with projections in GMS, and how to combine data from different coordinate systems into the same GMS project.

Navigating in SPSS. C h a p t e r 2 OBJECTIVES

Launch QGIS. Launch QGIS from. Open window Quantum GIS (Figure 1.1 below) Start All Programs Quantum GIS. QGISIcon on the desk top

Photo2GPS Instructions:

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

GY301 Geomorphology Lab 5 Topographic Map: Final GIS Map Construction

This user guide covers select features of the desktop site. These include:

v Getting Started An introduction to GMS GMS Tutorials Time minutes Prerequisite Tutorials None

Mosaic Tutorial: Advanced Workflow

ArcGIS Extension User's Guide

Geocoding Reference USA data in ArcMap 9.3

CHAPTER 2 GEOREFERENCING AND SHAPEFILE CREATION

MAKING TABLES WITH WORD BASIC INSTRUCTIONS. Setting the Page Orientation. Inserting the Basic Table. Daily Schedule

Exercise 1-1: Using GPS track data to create a field boundary

GIS DATA SUBMISSION USER GUIDE. Innovation and Networks Executive Agency

Equipping Municipalities with GIS Software

Downloading 2010 Census Data

INTRODUCTION TO GIS WORKSHOP EXERCISE

NMCRIS Map Service Application Feature Editing

Intro to GIS (requirements: basic Windows computer skills and a flash drive)

Exercise 4: Import Tabular GPS Data and Digitizing

Welcome to Introduction to Microsoft Excel 2010

Exercise 1: An Overview of ArcMap and ArcCatalog

Word - Basics. Course Description. Getting Started. Objectives. Editing a Document. Proofing a Document. Formatting Characters. Formatting Paragraphs

1. Setup Everyone: Mount the /geobase/geo5215 drive and add a new Lab4 folder in you Labs directory.

CMPSCI 145 Spring 2014 Lab #1. Professor William T. Verts

Microsoft Excel 2007

Budget Exercise for Intermediate Excel

USING CCCR S AERIAL PHOTOGRAPHY IN YOUR OWN GIS

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet

Objectives Learn how to work with projections in GMS, and how to combine data from different coordinate systems into the same GMS project.

GIS Basics for Urban Studies

EXCEL BASICS: MICROSOFT OFFICE 2007

Graphing on Excel. Open Excel (2013). The first screen you will see looks like this (it varies slightly, depending on the version):

Geography 281 Mapmaking with GIS Project One: Exploring the ArcMap Environment

New Shapes from Input Table: You can also create a new shapefile using data from an input table. You have three options in this case:

Adobe Dreamweaver CC 17 Tutorial

Beginner s Guide to Microsoft Excel 2002

Mapping Tabular Data Display XY points from csv

CHAPTER 1 COPYRIGHTED MATERIAL. Finding Your Way in the Inventor Interface

Download elevation model page 2 Re-Project DEM coordinates page 5 Cut region of interest page 10

Import, view, edit, convert, and digitize triangulated irregular networks

WILD 2400 ASSIGNMENT #1: GPS TUTORIAL*

Building Vector Layers

BIO8014 GIS & Remote Sensing Practical Series. Practical 1: Introduction to ArcGIS Desktop

Downloading shapefiles and using essential ArcMap tools

Lab Assignment #1: Introduction to Creo ME 170

Geography 281 Mapmaking with GIS Project One: Exploring the ArcMap Environment

Practical guidance on mapping and visualisation of crime and social data in QGIS

Exercise One: Creating A Map Of Species Distribution For A Publication

Introduction to ArcGIS Desktop

LAB 1: Introduction to ArcGIS 8

An Example of Regional Web Resources: Massachusetts, USA Digital Data

Geological mapping using open

RAPIDMAP Geocortex HTML5 Viewer Manual

OS OpenData masterclass 2013 Cartographic Design workshop

Computer Basics: Step-by-Step Guide (Session 2)

Where Did My Files Go? How to find your files using Windows 10

Setup Mount the //geobase/geo4315 server and add a new Lab2 folder in your user folder.

Dazzle the Web with Dynamic Dreamweaver, Part II

From data source to data view: A practical guide to uploading spatial data sets into MapX

Working with Images 1 / 12

Orchard Link Mapping Workshop (QGIS Training) Contact

Intermediate Microsoft Excel (Demonstrated using Windows XP) Using Spreadsheets in the Classroom

Download the Latest LTR QGIS version (2.18) from the QGIS website: download.qgis.org/ >> Settings > Options > Locale

v Water Distribution System Modeling Working with WMS Tutorials Building a Hydraulic Model Using Shapefiles Prerequisite Tutorials None

4. If you are prompted to enable hardware acceleration to improve performance, click

Payment Function Exercise

Lab 6: Transforming Spatial Data

Using Microsoft Word. Tables

2) Make sure that the georeferencing extension is on by right-clicking in the task bar area and selecting Georeferencing

QGIS LAB SERIES GST 102: Spatial Analysis Lab 7: Raster Data Analysis - Density Surfaces

1. Start ArcMap by going to the Start menu > All Programs > ArcGIS > ArcMap.

1 INTRODUCTION WAYPOINT MANAGEMENT ROUTE DIGITIZING...12

GIS DATA SUBMISSION USER GUIDE. Innovation and Networks Executive Agency

To complete this activity, you will need the following files:

Create Geomark in Google Earth Tutorial

Name: Date: June 27th, 2011 GIS Boot Camps For Educators Lecture_3

Transcription:

Exercise 03 Creating and Editing Shapefiles Assigned Feb. 2, 2018 Due Feb. 9, 2018 On the class website I've posted an exercise_03_data.zip file which contains a USGS 7.5' quad map of Laramie (as laramie_quad_usgs_1963.tiff) plus two gpx files -- one with a track around campus and the other with waypoints on the track. In this exercise we'll import those files, examine and adjust the CRS (coordinate reference system) associated with them, then create some simple overlay shape files. Before class on Feb. 9 use QGIS to import the tracks, waypoints, and base map, create the shape files, then, as described at the end, turn in your map and shapefiles next Friday by email. Use the documentation given in the links on the class website. You can reach the on-line QGIS manual either via that links page or from the QGIS Help menu. Most of the relevant parts in the main manual are under "Working with Vector Data". On the class reference page I've also added a link to a tutorial "A Gentle Introduction to GIS". In particular look at the "Vector Data" section. Finally, within QGIS, if you let the mouse hover over an icon, after a second or two a "tip" should appear. Send me an email if you encounter difficulties. First, download the exercise_03_data.zip file from the class website and extract it into a local or H: drive folder. Start a new QGIS Desktop session. Part I. GPS Data, Maps, and Coordinate Reference Systems. Use the menu entry Layer / Add Layer / Add Vector Layer and in the file dialog box navigate to your copy of the exercise_03 data directory and select exercise_03_track.gpx. Select the tracks (Geometry Type= MultiLineString25D) option and click OK. The track should appear in QGIS. Double click on this line in the Layers Panel to open the Properties dialog and change the line color and width to something that is easy to see. While there click on the General tab which among other things will show you the CRS (Coordinate Reference System) being used for this data. It should show WGS 84 (also known as EPSG:4326. There are European Petroleum Survey Group (EPSG) codes for a very large number of different possible CRS's). Repeat the above steps to import the exercise_03_waypoints.gpx file but in the final step select Waypoints (Geometry Type = Point25D) for those. When you create a new shapefile (which is what you are indirectly doing when you import the gpx data) you need to specify the Geometry Type of those shape files. You could, for example, have imported the track

file as a set of discrete points (as we did in exercise 1) rather than as a connected linestring. With the Pan tool selected (the hand-like icon) move around the image -- but without clicking. You should see longitude (about -105) and latitude (about 41) displayed at the bottom. The tentative "Project" CRS, adopted from the first layer you created, is WGS84 latitude and longitude. Now import the Laramie Map by selecting Layer / Add Layer / Add Raster Layer and selecting laramie_quad_usgs_1963.tiff. The map will probably cover up the GPS information. In the Layers panel drag the map down so you can see the GPS points above it. (Bug-workaround: Sometimes the map does not appear as it should. If this happens you need to remind QGIS to actually use the map CRS that was contained in the tiff file and should already be associated with this layer. Right click on the map in the Layers panel and select Set Layer CRS. A dialog box will open. Don't change anything there. Just click OK. The map should now appear.) The real track I recorded actually started and ended near the front entrance to Geology, but you will probably see that the track appears offset by about half the width of the building. While the map tiff file contained some information about the coordinate reference system, apparently it wasn't enough. Either the datum recorded in the file was wrong or QGIS misinterpreted that information. Unfortunately this is a common occurrence in GIS systems. Although it's nice when it "just works", you really need to test imports by recording waypoints at known locations and double-checking that they import as expected. In this case the fix is to force QGIS to use correct CRS information for the map. I've saved that information in the laramie_quad_usgs_1963_crs.txt file. Open that file with any text editor (such as notepad or wordpad) and copy the full text to the clipboard. If you look at that text, the proj keyword says this is a polyconic projection. The other keywords tell about the origin of the coordinate system, the assumed size and shape of the earth (Clark 1866) and the datum. QGIS is smart enough to do "on-the-fly" projection" to display both this polyconic projection and the "geographic" coordinates from the GPS on a common screen, but datum details matter. Back in QGIS right click on the Laramie map in the Layers panel and select Set CRS. You should see near the bottom of the dialog window an entry which looks almost like what is in the text file, but is missing the NAD information. The system ALMOST knows the right CRS, but has the wrong datum. For the moment back out of this dialog by hitting Cancel. From the main menu chose Settings / Custom CRS and in the dialog window which opens click the + sign to add a new CRS. In the parameters field paste the text you copied from the txt file. In the name

field enter Laramie_Map, then click OK. Back in the QGIS Layer Panel once again right click on the map layer, select Set Layer CRS, and in the CRS dialog window which appears, in the middle panel, scroll down till you see Laramie_map, select it, then click OK. When you do that the map should jump slightly, and the track should align with the front door of Geology. At this point, in case of error, you should use Project / Save As to create a project file which records the information about which layers you have loaded, and what CRS's those layers use. If you have to restart, then you can just load the project file. Part II. Creating shapefiles Create the three shapefiles described below (Points, Walkways, and Building), by selecting from the QGIS Menu Layer/Create Layer/New Shapefile Layer then specifying the appropriate shapefile type (point, line, or polygon) in the dialog which appears. You can keep the default parameters for most of the entries. In the "spreadsheet" we will create we need an index attribute (think of attributes as spreadsheet columns) for each feature we enter. For the first two files, keep the default integer ID attribute, and give each building and walkway a number. We'll do something different for the buildings. Since we can keep all the default parameters for the first (points) file just click OK, and choose a filename like uw_points in the dialog window which opens. (Double check this is going into a reasonable directory.) A new line should appear in the Layers Panel. Select it, then click on the Pencil icon to enable editing. (Again, if you hover over an icon, it should, after a couple seconds, give help information. It will take practice to learn which icons correspond to which tools.) Click on Add Features which is probably two icons to the right of the pencil. The cursor should change to a target. Proceed around campus adding points which for the moment represent buildings. Do this for at least 6 buildings. Each time you add a new one a dialog box opens, asking you to enter an ID, which should be an increasing count of integers. If you make a mistake you can either delete points, or open the attribute table and correct the numbers. When you are done adding points click the Pencil icon again to toggle off editing. It will ask you if you are sure you want to save the changes. Do save it. If we wanted, after we finished adding points we could edit the attribute table to add columns with additional information about each building. We'll do that with our final shapefile. Repeat the above, but now add a uw_walks shapefile which will contain linestrings -- connected sets of points. Other than changing the shapefile Type to Line, you can again use the default parameters. Note the Add Feature icon changes to show a string rather than an isolated point. When you click it the target cursor again appears, and each time

you left click on the map it adds a new vertex (ie. point or node) along the string. When you have added the last vertex you want, right click then enter the requested ID number. Add at least 3 lines representing different walkways on campus. For the third (uw_buildings) shapefile, choose Type=Polygon. In addition, remove the ID attribute by clicking on it then selecting Remove. Create a new BldgName attribute with the default 80 character. (An annoying limitation of shapefiles is that you need to specify the size of the attribute fields when you create them.) Using the map as a guide, add polygons representing at least six buildings. Once again each left click adds a vertex or "node". Right click after the final one. As you create the individual features, give each building a name. Try making deliberate mistakes in a couple, then go back and correct those mistakes using the Node Tool (a hammer next to a node). Click near a node to select that node, then drag the node to move it. The documentation discusses more sophisticated editing of nodes. Entering and Calculating Attribute Table Columns Once you have created the uw_buildings file, and saved it, right click on the uw_buildings line in the Layers panel, and select Open Attributes Table. You should see a table, with one line per building. Click on the Toggle Editing Mode icon at the left within the Attribute Table window. Several other icons which were grayed out become active. Select the New Column icon, which will probably be second from the right. Add a column named NR, with a comment field set to Rough Guess, with Type set to Decimal, with Width set to 3, and with Precision set to 0. Note that the column is initially filled with NULL. Fill in a rough guess of the number of rooms in each building. Finally, click on the Field Calculator button -- which looks like an abacus -- at the far right. This opens a dialog box which by default will add a new column, calculated based on the others. In the dialog box name the new column NStudents, set the output field type to Decimal, the length (or output field width in older versions) to 10, and the Precision to 2. We'll estimate the total students in each building by assuming each room contains on average 12.5 students. In the middle lower panel scroll down till you see Fields and Values, double click on it to expand the list of all column names. Double click on NR. That "NR" should appear in the expression box at the left. Then simply type *12.5 and it should show an Output preview at the bottom of that panel which matches the number of rooms times 12.5, for the first row in the table. If this looks right, click on OK to add the new column. Note in this case we added an actual numerical new column which although initially filled in with the calculated value, can also be edited cell by cell. We could also add a "virtual column" which is always calculated from the formula we specify. Explore the calculator to see what other options are available. Once again you will need

to toggle off editing to save the results. Labels Back in the main QGIS window (i.e. after closing the attribute table) you can label the buildings you've marked by first toggling on editing, then clicking on the Label icon. A dialog window will open which will initially show No labels at the top. Click on that drop-down list and select Show labels for this layer. In the next drop-down list select the BldgName column as your label. You can also adjust fonts, spacing, positioning, etc. Your map should now show those building labels.

Saving an image of your map Save an image of your map (for example for inclusion in a report) by selecting from the main QGIS menu Project/Save as Image, double check the default directory it wants to use is reasonable, then give it a file name. Select jpg type output. If you examine the files created you will see it has created not only filename.jpg, but also filename.jpgw. The latter is a "world file" which contains the geographic location information information for your image, useful for importing it back into QGIS or another GIS program. But to be useful you need to know the Coordinate Reference System (CRS) assumed in the numbers in jpgw. In this case, that is the CRS inherited from our first layer, which was WGS84 Geographic. Saving the Project Once again save the project file, to record the information about what layers are included and how they are displayed. If you saved this or your layer files on the local ESB1006 machine, be sure to copy the files back to permanent storage on your (network) H: drive or a thumb drive before you log off. Turning in the files next Friday You will turn in the files you created next Friday. To make that simple, try to have all the relevant files (the shape files, the project file, the image jpg and jpgw files, but not the large original map tiff) in a single folder on your machine. On Friday I'll show you how to package all of them into a single zip file named exercise_03_lastname_firstname.zip then submit that to the "homework drop" folder.