Geography 270 - University of British...

22
GEOB 270 Jan 2018 Lab 2: Coordinate Systems and Spaal Data Models General GIS Lab Procedures Please read the labs in their enrety. If you skip secons you will miss important details!! As you will be using ArcGIS for the rest of the course, we have documented for you here some general procedures, and will review many of the important concepts you were introduced to in Lab 1. The two basic applicaons you will be using in ArcGIS are: ArcCatalog: is the file browser where you can preview, document, and organize your data. ArcCatalog can be used from within ArcMap or it can be run as a separate program. ArcMap: is the program where you can view, edit, and analyze your data and create graphs, reports and printable maps. Launching the program may take a few moments. Be paent and do not aempt to re-open it or you'll end up running mulple instances which will slow down the computer. To find out what any buon or menu does in ArcGIS, place the cursor over it and note the text provided. You should play around with the program in order to discover their capabilies. We strongly encourage you to work locally in your workstaon by using the C:\temp directory. Before placing your data there, make sure that directory is clean by deleng any files leſt there by previous users. While working on your lab, save your map document to C:\temp\lab2 directory by using the File > Save As… opon from the menu bar. Once the document has been saved once, you can simply use the "Save" icon on the toolbar. The C:\temp directory is for your sole use while you are working on the computer. When you have finished your work, you must make sure that your data is copied to your H:\ directory. The next person to use your computer will erase whatever is in the C:\temp directory so that they can use it. The H:\ drive is your own space in the Geography server and data stored in there is available to you wherever you are in the Geography building. You should use it as your permanent repository for all of the work that you want to keep. Don't forget to copy data from C:\temp to H:\ and log off at the end of your session. Please remember that at any me if you need extra help, ArcGIS Desktop Help is a great resource. You can access it under the Help menu in any of ArcGIS program. The easiest way to use the help is by searching for keywords under the Index tab. Save your work every 10 to 15 minutes in case something goes wrong with your computer. 1

Transcript of Geography 270 - University of British...

Page 1: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

GEOB 270 Jan 2018

Lab 2: Coordinate Systems and Spatial Data Models

General GIS Lab Procedures

Please read the labs in their entirety. If you skip sections you will miss important details!!

As you will be using ArcGIS for the rest of the course, we have documented for you here some general procedures, and will review many of the important concepts you were introduced to in Lab 1.

The two basic applications you will be using in ArcGIS are:

ArcCatalog: is the file browser where you can preview, document, and organize your data. ArcCatalog can be used from within ArcMap or it can be run as a separate program.

ArcMap: is the program where you can view, edit, and analyze your data and create graphs, reports and printable maps.

Launching the program may take a few moments. Be patient and do not attempt to re-open it or you'll end up running multiple instances which will slow down the computer.

To find out what any button or menu does in ArcGIS, place the cursor over it and note the text provided. You should play around with the program in order to discover their capabilities.

We strongly encourage you to work locally in your workstation by using the C:\temp directory. Before placing your data there, make sure that directory is clean by deleting any files left there by previous users. While working on your lab, save your map document to C:\temp\lab2 directory by using the File > Save As… option from the menu bar. Once the document has been saved once, you can simply use the "Save" icon on the toolbar.

The C:\temp directory is for your sole use while you are working on the computer. When you have finished your work, you must make sure that your data is copied to your H:\ directory. The next person to use your computer will erase whatever is in the C:\temp directory so that they can use it. The H:\ drive is your own space in the Geography server and data stored in there is available to you wherever you are in the Geography building. You should use it as your permanent repository for all of the work that you want to keep.

Don't forget to copy data from C:\temp to H:\ and log off at the end of your session.

Please remember that at any time if you need extra help, ArcGIS Desktop Help is a great resource. You can access it under the Help menu in any of ArcGIS program. The easiest way to use the help is by searching for keywords under the Index tab.

Save your work every 10 to 15 minutes in case something goes wrong with your computer.

1

Page 2: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

Introduction

In this exercise you will use ArcGIS to explore spatial map data of Canada and Washington State in the U.S. while learning about coordinate systems, datums, projections, and spatial data models (raster and vector data). At the end of the lab, you will use raster landsat data to review the before and after of Mt. St. Helen’s volcanic eruption in 1980.

Learning Objectives:

Part 1 – Managing and previewing data Familiarize yourself with ArcMap and ArcCatalog interfaces. Learn how to preview, manage, and explore the properties of spatial data

Part 2 – Understanding Coordinate systems/spatial reference systems (NOTE: these 2 terms mean the same thing) and map projections

Create, save, and store a map document properly Understand the importance of reference systems in spatial data Learn how to manage and change projections Learn how to repair misaligned and improperly referenced spatial data Learn the effect that projections have on geometric properties Learn best practices when working with spatial data and reference systems

Part 3 – Compare and Contrast Spatial data models Understand the difference between vector and raster data model Learn the effect data models have on visualization and processing of spatial datasets Learn how add fields to an attribute table and how to perform simple calculations

Part 4 – Working with remote sensing imagery Gain a basic understanding on how remote sensing works Learn to display remote sensing images Learn to create a composite image using the different band from satellite data

Due: This is a 2 week lab, due at the BEGINNING of your lab time in 2 weeks. Any labs submitted after the start of your lab time, will be marked late. Answers to lab questions will be accepted in a pdf for text answers. Submit answers to questions via the course web site: http://blogs.ubc.ca/giscience/labs/

Part 1 - Managing and Previewing Data

Most of you are familiar with maps; you know how they look, what types of information they contain, and you know how to read them. You may also have become familiar with basic digital maps through exposure to Google maps or other online mapping services. However, when working in a digital environment (and eventually conducting spatial analysis within a GIS

2

Page 3: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

framework) you need to become aware of many issues that are often not even considered when working with products such as Google maps.

Examining Data in ArcCatalog

As you learned in lab1, for each of the labs, you will be using the GetData script (a script developed by us in Geography) which transfers the necessary lab data from the server into your local C:\temp directory.

On your Windows Desktop, double click on the GetData icon to transfer the Geob270-lab2 data to your c:\temp directory

Start ArcCatalog from the Start > Programs > ArcGIS > ArcCatalog 10.4

ArcCatalog is an ArcGIS application that allows you to manage, examine, organize, and prepare your data for analysis. The catalog tree lists the data sources it is aware of while the right side of the window displays information about the item selected in the catalog tree. You can use the Contents, Preview, and Description tabs to display different information.

If the folders you want to work with are not listed in the Catalog tree, you can create a connection to them by selecting File > Connect Folder… from the menu bar or by using the connection icons on the Standard toolbar (see image below). Make sure you have connections to “C:\temp” and to the “H:\” drive.

In the catalog tree, click on C:\temp\lab2\Canada to show the folder contents. The contents tab should now list the names and types of the data files. Click through the Content appearance buttons to change the appearance of the display area.

ArcGIS supports many file formats, each with its unique icon in the content list. In this exercise you will work with shapefiles, layer files, and raster datasets. You will be introduced to other formats in subsequent labs. Take a few minutes to preview the different data sets with which you will be working.

3

Connectivity Content Appearance

Standard Toolbar

Page 4: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

Although the metadata is not always complete for these files, it is always a good idea to read the Description tab before you start working with a database. This may give a better idea of the nature, quality, and limitations of each dataset.

QUESTION 1 (2) Where did this data come from? (not Getdata, but where did UBC Geography get this data from).

4

Shapefiles(vector)

Raster layer

Page 5: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

You have been asked by a friend to make a map of Canada showing the locations of all of their family-owned business for them to post on their company web site. Are you allowed to use this data for that reason? List another open data source where you can download a Canada shapefile for use in GIS analysis.

Most data layers have a table associated with the geographical representation. You can glance at it by changing the preview at the bottom of the Preview tab

Preview the Canada shapefile and examine its table attributes. Vector files and many raster files will have a table with relevant information. Note, in the preview, maps are called geography and attributes are stored in tables. Statistics Canada uses this terminology as well.

Now, on your catalog tree, preview Canada.tif. Note that the shape of Canada looks different than Canada.shp. In the Catalog tree, right click on Canada.tif and go to its properties. Scroll down until you find the Spatial Reference information (see below).

5

Page 6: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

The projected coordinate system for this file is Canada Lambert Conformal Conic, with the meter as its Linear Unit. The Datum is D_North_America_1983 (NAD83).

Now go back to Canada.shp, properties, x,y coordinate system.

QUESTION 2 (2) What is the x,y coordinate system for this shape file? Why do these previews of the 1. shape file map of Canada, and 2. the raster tif image, look different in their spatial outline and shape? What are the differences between coordinate systems and projected coordinate systems?

This information on spatial reference systems, coordinate systems, datums is critical for accurately lining up spatially map and raster image layers in GIS ArcCatalog is a powerful data browser capable of preview data. Of critical importance are the Spatial Reference properties which allow GIS software to locate each layer in its proper location in the world.

You will now spend the next section of the lab working through several scenarios in which you will use ArcGIS to manipulate the spatial properties of the layers, learning how to properly deal with variances spatial coordinate systems.

Part 2: Compare and Contrast Coordinate systems and projections

In Lab 1 you were taken on a whirlwind tour of ArcGIS. Most of the map compositions shown had already been created and saved as map documents or *.mxd files such as PopulationChange.mxd. However, in most of our labs you will be asked to create a map from scratch and save it as map document, or as a *.mxd.

It is important to note that an *.mxd file does not contain any data, but only the location where the data can be found. If you send somebody an *.mxd file, but none of the files (e.g. raster files, geodatabases, etc…), then when they open the *.mxd file in ArcMap, they will see an empty map layout with no files in it. In general, it is good practice to store your map document in the same directory as your data (such as C:\temp\Lab2), and then deliver, submit, or save the entire directory. Think of an .mxd as a bookmark you can open that will load all the pathnames to the layers and, load the symbology symbol sets you set up, and other cartography.

Review the properties of the data layers in the Canada folder – familiarize yourself with the coordinate system, datum, and units of measurement.

Close ArcCatalog if you had it open, and now open ArcMap10.4 and select "New Maps > My Templates > Blank Map" in the startup dialog box, and click OK.

6

Page 7: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

When creating a new map, ArcMap opens with a default Data frame called "Layers". Before you move on, change the name of the "Layers" data frame to "Part 2" (right-click on its name, select Properties > General tab, change the name, and press OK).

Displaying Data Frame properties in ArcMap

Add the Canada.shp and lakes.shp datasets to this data frame by selecting Add Data from the

File menu or the icon from the toolbar. Arrange the layers in the table of contents (TOC) so that lakes is at the top of the stack.

Under the View menu, make sure the Status Bar option is checked. If you move your mouse over the map, you should see the position coordinates of your pointer on the lower-right corner of the ArcMap window. (The units of the coordinates can be changed by right-clicking on the data frame Part 2 > Properties > General tab. You can use the drop down menu next to Display to select how the coordinates should read.)

One feature of ArcMap is that when you first add data into the TOC, the software will read the spatial reference information of the first layer to load and assume that all other layers should show with the same coordinate system as the first one. If you compare the spatial reference of the layers to that of the data frame you’ll see they use the same reference system.

To view the spatial reference system, right clock on layer, properties, source. Do this.

QUESTION 3 (1)What is the coordinate system of lakes? Is is projected?What is the coordinate system of Canada?

7

Page 8: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

Projection ‘on the fly’ & Effects of projecting spatial coordinates

Add Canada.tif to you map. Examine the coordinate system – right click on layer, properties, source, scroll down for

spatial reference system.

Scroll down in the Source tab until you see the reference information. You can see that it is different than for Canada and Lakes – like we saw in Arc Catalog.

In spite of the difference in coordinate systems, the layers line up nicely. This feature of ArcMap is called projection-on-the-fly, which allows you to combine layers with different coordinate systems and have them align with each other. The spatial data coordinates are not permanently changed by this process; it just makes everything ‘look like’ they are in the same coordinate system for display purposes.

It is often necessary to permanently project data into different coordinate system depending on the purpose of the map and the region covered by the data layers. Remember – every time you project data into a different coordinate system, you distort the coordinates slightly and compromise area, distance, shape (angles) and direction.

You will now change the projection of the data frame and see how distance in affected. Add the major_cities layer,

You need to measure the distance between Whitehouse and Victoria. In order make it easier to pick the correct points, we need to quickly highlight only those two cities.

Under the Selection menu click on Select by Attribute. This tool allows you to select features from a layer that meet certain conditions, in this case cities with name of Whitehorse or Victoria.

To write the condition,o in the dialog box select major_cities from the drop down menuo double click on “Name”, click on ‘=’, Click on ‘Get Unique Values’ button,

and double click on ‘Whitehorse’ on the list. This would select Whitehorse only.

o To add Vancouver to the condition Click on ‘Or’, add Name and = as you did before, and select Victoria from the list. The dialog box should look like the picture below. Press Ok

8

Page 9: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

QUESTION 4 (1)What would happen if you used the operator AND instead of OR in the above equation to select Victoria and Whitehorse?

Once the condition is evaluated you should see two dots highlighted in Cyan among the cities layer. To make it easier to work with only those two cities, you will create a new layer from the select features:

Right-click on the major_cities layer > Selection > Create Layer From Selected Features. The major_cities_selection layer appears in the table of contents.

Turn off the original cities layer to simplify the map.

Keep in mind that this selection layer is only a temporary layer that resides within this map document. Think of it as a type of ‘bookmark’ to the relevant features on a data layer.

To test the effect of projections on distance, you will the use Measure tool, a ruler-looking icon on the tool bar. You can measure distance and area on the map. In the tool window:

Select Line, Kilometers as your distance units. The last drop-down menu in the tool gives you the following options

9

Page 10: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

You data frame should be in the GCS_North_American_1983 coordinate system. As you have learned in lecture, a Geographic coordinate system (GCS) is not a projection, but rather a representation of features on a spheroid. Accordingly, the Planar option is not available. You will make this measurement using the Geodesic option. You can find more information about the

four types of measurement here: http://tinyurl.com/p8ag77l .

With the parameters set for the Measure tool, the pointer has changed to a crosshair. As you mouse over Vancouver, it should snap to the center of the symbol. Click once to anchor the tool in Vancouver, and drag the pointer over to Halifax. The distance should display on the measure tool. Write down the distance.

Now, change the projection of the data frame to match that of the Canada.tiff image. (Look in the tiff images to determine projection, then change the projection by clicking data frame properties > Coordinate System> Projected Coordinate Systems > Continental > North America… pick the coordinate system the matches) It is one of the common projections used when displaying Canada as a country. Repeat the measurement using the Planar option this time. Notice the new value.

QUESTION 5 (1) What is the difference in distance? Although the difference may not be substantial for such a long distance, it does show the need to pay attention to the coordinate system used when performing spatial analysis.

QUESTION 6 (1)Landmasses attain different shapes and areas depending upon the coordinate system and map projection. Find Ellesmere Island in northern Canada. Note its shape. Change the dataframe coordinate system back to Geographic Coordinate System>NAD_83 (CSRS). Look at Ellesmere Island now. Which does a better job of maintaining shape!

Defining a projection

Coordinate system information is critical when working with spatial information. When each layer is properly documented everything works smoothly. However, improperly referenced data is a common occurrence.

In this scenario, you have a national park layer that you want to add to your map. Unfortunately, it is missing the spatial reference that would allow it to align itself with your other datasets.

If you have not done so yet, change the projection of the data frame to Projected Coordinate Systems> Canada Conformal Conic, the same one as the image of Canada. Change the display units to Meters under the General tab.

10

Page 11: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

Launch ArcCatalog from within ArcMap, and dock the Catalog window to the right edge of ArcMap.

Find the nat_parks layer and look at its Properties > XY Coordinate system tab. You’ll notice the coordinate system is ‘unknown’.

Look at the Feature Extent tab and notice the magnitude of Max/Min values for the X and Y coordinates.

Add the nat_parks layer to the map. A warning pops up stating that the spatial reference is missing. Click Ok. The layer is added to the TOC but there are no parks to be seen on the map.

Right-click on nat_parks and zoom to layer. The parks show up now but they are somewhere in Canada but they are extremely small.

The reason for the discrepancies in location and scale is due to the magnitude of the coordinates. If you move your mouse over Canada (you can zoom back to Canadian extent) you’ll notice that the coordinates are in the scale of hundreds of thousands while the extent of the park, as you saw in the properties of the park layers is in the tens or hundreds. This leads to a misaligned layer. You will now proceed to fix it.

Zoom to the full extent of Canada Remove the nat_parks from the TOC In the Catalog tab, navigate nat_parks layer and launch the its properties Under the XY Coordinate System tab click on Geographic Coordinate Systems > North

America > NAD 1983 and click OK. Add the layer back to the map. Everything should line up.

In this case we chose NAD 1983 because that was to original coordinate system before the information was lost. If you were to receive a layer with a similar problem, you would have to check the metadata that came with the layer or with provider of the dataset for the missing information.

How to Project a layer11

Page 12: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

We have already discussed and performed Projection-on-fly which is a very practical feature of the program to align spatial coordinate systems for display and mapping. You are likely to use it when printing a map that requires a different look than the original dataset. However, when performing spatial analysis it is a good practice to change the projection for the layer into a common spatial reference system.

Unlike Projection-on-the-fly, projecting a layer actually modifies the spatial coordinate data and creates a new version of the data layer with a different coordinate system. Therefore, you cannot just go to the properties of a layer and change the information there like you just did in the previous section. You have to invoke a special tool in ArcCatalog to perform the transformation.

There is a rivers data layer that you need to project to the Canadian Conformal Conic projection.

Add the rivers layer to the TOC. Check its coordinate system. It should be GCS_NAD83. From the tool toolbar launch ArcToolbox and dock the window that appears to the right

edge of ArcMap. You now have ArcCatalog and ArcToolbox available as tab when you need. ArcToobox is a collection of 700+ tools for spatial analysis. You will learn many of them throughout this course.

In ArcToolbox, navigate to Data Management Tools > Projections and Transformations > Project

In the tool’s dialog window enter the following parameters:o Input Dataset: rivers.

(The program reads the current coordinate system and fills the next box)o Output Dataset: c:\temp\lab2\Canada\rivers_projo Output Coordinate System: Click on browse button and select Projected

Coordinate Systems > Continental > North America > Canada Lambert Conformal Conic

Click Ok. A progress window will appear and after a few seconds the operation will be completed.

Add the new layer to the map. To observe the effect of the tool, look at the Source tab in the properties for both layers.

Pay special attention to the magnitude of the top/bottom and left/right values and the units used by each layer.

Shortcut: If you have a layer without a defined spatial coordinate system, you can also pick the coordinate system from another layer

Best practices when dealing with spatial reference systemsProjections and reference systems are probably two of the topics that cause the much grief when dealing with spatial data, even to frequent users of GIS software. Here are a few pointers when working with spatial data:

12

Page 13: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

It is always a good idea to preview the data with ArcCatalog before starting on your analysis.

Check whether layers have coordinate system information, and fix the ones lacking that data.

Find out what the official/common projections are for the area of study. Many regions have official or recommended coordinate systems for analysts to use.

Before setting out with your GIS analysis, convert all your layers into the common projection for the area of interest. This will make calculations run more smoothly.

Keep in mind that ArcGIS will use a layer’s default projection when performing calculations. For example, if the layer uses feet as the linear unit, any area calculations for that layer will be done in square feet by default.

Close down the toolboxSave your work (lab2part2.mxd)

QUESTION 7 (4) Under File>Export your map to lab2part2.pdf. Save this and submit through connect with your pdf of question answers.

Summary Learning Objectives 1 and 2.Go back to beginning of lab and review learning objectives of this section. You should be able to:- understand the difference between geographic and projected coordinate systems; spherical and planar. - view shape of Canada, and measure distances with different coordinate systems: Geographic and Canada Lambert Conformal Conic and understand why the views are different (with lecture material). - understand the difference between project-on-the-fly and actually project permanently coordinates- work more with ArcCatalog and ArcMap to preview data and understand spatial coordinate systems.

Part 3 – Compare and Contrast Spatial data models

Comparing Vector vs. Raster

When performing analyses in GIS, you first need to convert real world phenomena into a format that can be manipulated by the computer. This process of abstraction is called data modelling.

Spatial data is normally grouped into two types of data structures: vector and raster data. In this Part of the lab, you will learn the differences between vector and raster data sets, and compare Mount St. Helen’s before and after the volcano erupted in 1980 using both raster and vector datasets.

Working with vector datasets

13

Page 14: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

When using vector data, the phenomena you are working with are represented by point, lines, or polygons. A point is the most basic element of vector datasets but can be used to build the other elements since points build lines, and lines build polygons.

Vector datasets also align themselves with the idea that the world can be represented by layers containing objects with clearly defined geometries and boundaries. For example, a point can represent a fire hydrant, a line can represent the centerline of a road, and polygons can be used to represent the outline of buildings.

You worked with vector data in the previous section of this lab, but we will continue to explore the properties of vectors by opening a new map document and switching our focus to Washington State in the U.S. and the area around Mt. St. Helen’s. Mt. St. Helen’s erupted in 1980 and is currently active and has recently been in the news for increased earthquake activity.

https://www.straight.com/news/1014631/washington-states-mount-st-helens-experiences-series-130-small-earthquakes

Open new map document Add from the Washington folder the WashingtonSt & Counties layers Examine the properties of these layers. Under the Source tab you’ll see details of the

type of geometry, the file format, and the spatial reference for the layers.

QUESTION 8 (3)What is the projected coordinate system of the two shapefiles? As you learned in lecture, different classes of map projections maintain certain properties and distort others (properties being area, angles/shape, distance and direction). What property is this map projection maintaining or not distorting? Would you use a similar map projection of counties or census tracks in BC to create a map of population density? Why?

Administrative boundaries like states and counties are commonly represented as vector layers. This data structure also allows the GIS software to quickly calculate some geometric properties like area.

Open the attribute table for WashingtonSt. Notice the Shape* field indicating that this is a vector layer containing polygon features.

From the Table Options button > Add Field… In the new pop up window name the new field AREASQKM, select type Long Integer,

and click OK. This will create a new field where we will calculate the area for Washington State.

NOTE: There are many data types when adding fields, depending upon if you need decimal places for integers, if you have character strings, if you have number and characters mix. Keep this in mind for future labs, do NOT always automatically add type of long integer.

Once the field appears in the attribute table, Right-click on its name > Calculate Geometry… Click Yes in the edit session pop up warning. You will learn about edit sessions in the next lab.

14

Page 15: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

In the Calculate Geometry dialog, pick Area as the property, use the coordinate system of the data source, and pick Square Kilometers as the units. Click OK. Note: remember that unless told otherwise, the software will use the linear unit that comes with the coordinate system of the layer by default for any calculation.

Open the Counties attribute table and calculate the area for the counties in similar fashion.

QUESTION 9 (2)What percentage of Washington’s administrative area does Skamania County represent?

Working with raster datasets

The raster data model represents the world as a regular grid of cells also known as pixels. This type of structure works well when you are dealing with phenomena that exist throughout a space and do not necessarily have distinct boundaries. Raster layers are frequently used to symbolize temperature, elevation, rainfall and similar type of phenomena.

The type of data structure used also affects the type of calculations and operations that can be performed on a given layer.

Add the nlcd2011_was_s landcover raster (national raster layer of landcover in the United States)

Examine the attribute table of the new layer

QUESTION 10 (2)What is the resolution or cell size of the raster layer? What are the coordinate system, linear unit, and datum of the raster?

One of the first things you’ll notice is the lack of a ‘Shape’ field. Instead, you’ll see the fields VALUE and COUNT, typical of raster layers. Instead of using polygons to represent features, a raster layer assigns a representative value for each cell in the grid. If adjacent cells have the same value they are no automatically merged into one bigger cell, they just display with the same symbology. All cells remain independent from each other.

In the attribute table, VALUE represents the value of a cell, and COUNT contains the number of cells in the raster layer with that same value. You will now calculate the area, in square kilometers, for each land cover type:

Add a new field called AREASQKM to the attribute table of nlcd2011_was_S in the same manner as you did in the vector layers. You’ll notice that the Calculate Geometry option is not available – WHY? Answer – this is not a vector layer, no geometry.

To calculate the area Right-click on AREASQKM > Field Calculator and click Yes in the pop up window. The dialog window allows you to enter the formula for calculating the area for each land cover type.

The area of a given category in the raster layer can be calculated as:Area of one cell X the number of cells with the same value X unit conversion factor (if any)

15

Page 16: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

The land cover layer has square pixels, and we know that 1 square kilometer equals 1,000,000 square meters.

In the field calculator dialog enter the formula as in the image below and click OK.

The field calculator can be used for numeric calculations, or to update text and date value fields, in both vector and raster layers.

QUESTION 11 (1)List the three types of land cover with the largest areas and their values in square kilometers.

Vector vs. Raster layers

To demonstrate a couple of more issues with the two formats: Add the NatForestRoad layer to the map and drape it over the land cover data. This

represents a segment of one of the many service roads located in the area Through its Properties > Symbology change the color/thickness of the line so it is clearly

visible over the land cover data. In the TOC, right-click on the road layer > Zoom to layer to see the extent of the road segments.

With the Zoom In tool zero in on any of the winding parts of the road, around a 1:5000 scale. Examine how the road is represented in both layers.

Use the Identify tool to display road information in both layers

16

Page 17: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

When you use the identify tool on the road layer, a line segment corresponding to the road is selected and its information displayed in the pop window. When you do the same in the land cover area, only individual cell information is displayed. This brings up the issue discussed earlier in this section of how each data structure treats ‘objects’.

In raster models, cells are individual spatial unit, even if visually it is obvious that they are part of another feature, like a road. Contrast this with the vector model where the object is its own entity and all the pertinent information can be accessed at once.

Another issue to notice is that even in areas of where the vector road overlays fairly closely to its raster representation, the raster category seems to be different in certain areas even though the pixels clearly follow the road. A pixel presents one value for the area of the entire pixel.

The availability of data layers in either vector or raster format depends on the original source of the data, how it was digitized or acquired, the purpose for which the data was collected, and the nature of the phenomena being recorded, among others reasons.

It is possible to convert between data formats to perform GIS analyses, something you will experience in the next lab. It is important to have a good sense on what each type brings to the table. It is likely that in any given analysis you will end up working with both types of data at once.

QUESTION 12 (2)Discuss the accuracy or resolution of this raster data. In your answer give examples of what GIS applications/mapping projects the data is suitable for, and not suitable for. (Give one example of each).

Save your work (Lab2Part3) and open a new blank map.

Part 4 – Working with Remote Sensing imagery

Remote sensing is the process of collecting information about an object or surface from afar. This is done by measuring how much a target absorbs or reflects energy when exposed to an

17

Page 18: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

energy source. This is the principle used in satellite imagery, aerial photography, and lidar (remember from the first lecture, we discussed lidar data that was used to map very accurately glaciers in this area of Washington State). In this section, you get to experience satellite data in ArcGIS, viewing landuse change over time with remotely sensed Landsat data.

The Landsat Program

Landsat is a remote sensing program that has been continuously scanning earth since 1972. It uses sunlight as its energy source and measures the response of objects and surfaces on earth. There have been new satellites launched with better sensors as technology has evolved, culminating on Landsat 8 currently in orbit. Landsat can scan the same area of earth every 16 days.

The sun produces different levels of energy, some visible to the naked eye and some requiring special sensors. These “levels of energy” are classified by their wavelength. Landsat satellites carry multiple instruments capable of reading these different wavelengths or bands. In the exercise that follows you will use the blue, green, red bands (all visible to the naked eye) and the Near Infrared band or NIR (not visible to naked eye) to compose and compare the effects of the Mt. St. Helen’s 1980 explosion had in the surrounding landscape. You will be comparing images from 1979 and 2002.

To produce color images we create composites by mixing different satellites bands. The most common and obvious one is by mixing the blue/green/red bands to create a true color image.

Open new map From the Landsat\July 1979 folder select and add the Pseudocolor_1979.tif, a raster

image composed of the blue, green, and red bands. (Note: do not double click the .tif files, just single click and add. If you double click the file, you expose the individual bands that come with it, losing the ability to create color composites)

Right-click > Zoom to Raster resolution for best layer resolution (one computer pixel to one raster pixel)

Another common combination is to use green, red, and near infrared bands for the blue/green/red channels respectively. This produces a false color image where vegetation is represented in different shades of red, water as black/dark blue, and bare soils as grey with a cyan/greenish hue.

From the Landsat\July 1979 add multispectral_1979.tif. It loads with a strange colour. That file has 4 bands. We need to fix which band we want to display in our map.

Click on multispectral_1979.tif > Open properties > Symbology > RGB composite. It allows you to determine which landsat band to show in the RGB channels.

Change Red Channel to Band_3 (Near_Infrared). And Blue Channel to Band 1. Click Ok In the TOC, use Ctrl+Click on the two 1979 layers and right-click > Group. Rename the

group to Landsat 1979 From the Washington folder add the SpiritLake shapefile. We will use it as reference

later.

18

Page 19: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

The false colour is commonly used to gauge vegetation growth and health as plants have a strong reaction to the NIR band.

The previous set of images was taken in July 1979. Mount St. Helen erupted in May 1980 changing drastically the surrounding area. To appreciate the landscape change you will now compare it with a July 2002 satellite image.

From Landsat\July 2002 add Multisprectral_2002.tif. Remember select and add, don’t double click the .tif file.

Click ‘Yes’ if asked to create pyramids.(Note: Pyramids are raster layers created from the original image but at coarser resolution so that the program can render the map more quickly at difference map scales.)

Need to fix the RGB channels used. Properties > Symbology > RGB Composite to create true color image.

Make Red Channel – Band 3, and Blue Channel – Band 1. Leave Green Channel as Band 2.

You can lighten the new image by changing the brightness to 15% at Properties > Display > Brightness

Change name of layer to ‘True Color 2002’.

To create the 2002 false color version using NIR you modify the channels again: Add Multisprectral_2002.tif again Properties > Symbology > Red Channel – Band 4, Green – Band 3, Blue – band 2 Rename new layer to False Color 2002. Group the 2002 composites together and rename group to Landsat 2002.

You could compare the two years by manually clicking on/off the equivalent layers for each of the two years and see the effect on the topography. If you drag the Spirit Lake layer above the Landsat 2002 group, you can clearly see how the original shoreline has changed. Also, the lake

19

Page 20: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

to the NW of Spirit Lake is the result of debris blocking the existing creek and forming a new lake after the explosion.

There is a more practical way of comparing two images:

Launch the Image Analysis panel from Menu Bar > Windows > Image AnalysisThe panel can be docked to the right-side of ArcMap.

To compare the two False color images, from the Image Analysis tab, turn on the two false color layers and turn of the other ones

Select the False Color 2002 layer and click on the Swipe layer icon

The pointer changes to a thick arrow as you enter the map window. Click and drag the pointer to the left/right, or top/bottom of the screen to reveal the 1979 layer underneath.

You can now visually confirm the damage to the area features. Spirit Lake expanded as debris blocked its drainage system and debris actually increased the volume of material in the lake.

20

Page 21: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

Remember that in false color images using NIR band vegetation will show red, barren soil as grey/greenish tint, and water black or really dark blue.

Satellite imagery and aerial photography are the source of many raster layers available for analysis. In this section you have adjusted the visual combination of information. In future labs you will be exposed to analysis tools that allow mathematical/statistical manipulations of raster data.

QUESTION 13 (4)Landsat data provides a repository of raster data imaging of the world, in approximately 16 day intervals, since 1972. You have had a glimpse of the power of this dataset to geographic analysis in comparing Landuse change after the volcanic eruption of Mt. St. Helen’s. Give another example where Landsat data would be useful for geographic analysis. In your answer, describe the question you need to research, the geographic location, and the time interval you would select from Landsat images. Are there any requirements for time of year or season?

QUESTION 14 (3)Export your Landsat imagery with Mt. St. Helen’s in the middle to a pdf. Submit pdf.

Submit Answers/Images to Lab Questions

21

Page 22: Geography 270 - University of British Columbiablogs.ubc.ca/.../files/2018/01/Lab2_SpatialData_2018.docx · Web viewGEOB 270 Jan 2018Lab 2: Coordinate Systems and Spatial Data Models

Answers to lab questions will be accepted in a pdf or .jpg (jpeg) for map images and pdf for text answers. Submit answers to questions via the course web site: http://blogs.ubc.ca/giscience/labs/

Out of 29

22