In this lab you will work with GIS editing tools to create/ update map features.
- Create a Folder & Copy and Paste myedits Data Folder
- GPS Collection Using a Mobile App
- Map Updates: Tour of Missing Features
- Tour of Vector Maps
- Editing: Feature Updates in ArcMap
- Add the GPS Features
- GPS Resources
1. Create Folder & Copy/Paste myedits Folder
Two basic methods will be used to create map updates to the 1:50,000 NTDB vector data (1985/1996):
- Screen digitizing new vector features (points, lines, polygons) using remote sensing images as a visual guide;
- Capturing new spatial data using a GPS unit.
Your lab TA will accompany groups of students outside to use the GPS units. The remainder of the students will continue with the lab in-class
- Login to local machine; click on folders icon; double-click on geog205 folder; right-click->create new folder; name it data_input
- start osmotar (windows) server.
- Copy the folder “myedits” from: L:\labs\geog205\gps_editing to your data_input folder
When finished the copy and paste, you should see: K:\geog205\data_input\myedits
2. Using and App to collect tracks and waypoints
This section is optional, but if you are interested in collecting GPS data using your phone – it may be interesting. If you collected data from this section, we can work with the data in next week’s lab.
You can use the apps below to collect track and waypoint data in the same manner as using a GPS/GNSS device.
Download OpenGPX Tracker from here This app is quite simple. It has a map interface using Open Street Map (OSM) or Apple imagery. The OSM data can be cached to take in the field. We are really only interested in collecting tracks and maybe waypoints. Install the app –> turn on location services for the app (on be default) –> Turn on the app –> click the start button –> you can stop, start. pause tracks–> click on the folder in the top left to see the tracks –> press tracks to share via email.
Download GPS Logger from here This app is super simple – so simple it has no map interface. If you feel you need an interface, download OSMand~ or even better GeoPaparazzi (because not all paparazzis are evil). Turn on Location Services (device only) –> Install the app –> turn it on (outside) –> click tracks –> start walking. You can play with the settings to decrease sampling, manage tracks to save the tracks and to share (email). You can also collect waypoints. Collecting and using GeoTagged photos Take a look at this tutorial geotagged tutorial from Geog 204 (many of you may remember it). This process takes your geotagged photos and makes a KML file of the results. We are going to follow this strategy for collecting photos, as well as collecting tracks. Ensure that locations services are turned on for your phone and your camera app is on the list of apps that can access location services. By default this should be the case for most users. Then head out to collect data. Independent of collecting tracks, take photos with your camera on your phone (you can take photos with a separate digital camera while tracks are being recorded on your phone as well)
Collecting and using GeoTagged photos
Take a look at this tutorial geotagged tutorial from Geog 204 (many of you may remember it). This process takes your geotagged photos and makes a KML file of the results using GPSPrune. You can follow this strategy for collecting photo located points. Ensure that locations services are turned on for your phone and your camera app is on the list of apps that can access location services. By default this should be the case for most users. You can now head outside to collect data.
You can also use the tracks collected use the apps above (OpenGPX and GPS Logger to geolocate photos taken with a different device (such as a SLR camera) as you are recording your tracks with your phone. You would use GPSPrune to geotag theses photos.
3. Tour of Missing Features
Interpreting Raster Imagery to Produce Vector Line Work
In the previous lab you examined NTS topographic maps 1:50,000 and 1:250,000 as well as a 1:1,000,000 scale map. The NTS map sheet features were interpreted from aerial photography. One of the paper maps for 093G15 was interpreted from air photos in 1981, with updates in 1982. You saw these statements printed on the edge of the map sheet.
For the digital NTDB version of the map (the vector version of 093G15 seen in ArcMap), further updates were made in 1996. This information is contained within the dataset metadata file bndt_093g15_4_2_fgdc_en.html located in your myedits folder. The currency is listed under the Time Period of Content heading. You examined this metadata in the last lab where it was viewed through the rivers layer.
Since 1996 more development has occurred in the Prince George map sheet 093G15. Map updates can be made from remote sensing images and/or surveyed with GPS.
The Remote Sensing Imagery you will be using as a visual guide for updates in this lab are:
- ikonos_02.ecw (Ikonos Satellite)
- spot__06.tif (SPOT Satellite)
- campus20cm_2010.tif or campus_2014.tif (City of Prince George Colour Air Photo)
- bcgov_93.tif (Government of BC Panchromatic Air Photo)
The following table lists the raster image resolution and date of capture:
|campus20cm_2010.tif or campus_2014.tif
||Colour Air Photo||2010 / 2014||20cm / 7.5cm|
|bcgov_93.tif||Panchromatic Air Photo||1993||1m|
The resolution of a raster layer is measured by the distance on the ground covered by one raster cell (pixel). Higher resolution imagery (smaller cell size) provide more detail, but this creates very large digital files (and are often more expensive to acquire and store).
These raster images will serve as visual guides for your editing of new, updated features for the vector layers. In the following figure, note the amount of detail at different resolutions as well as new features in more current years.
- Open the map document L:\labs\geog205\gps_editing\RSimagery.mxd
- Save your own copy as follows: File -> Save as and save the map file to your local folder as myimage.mxd
Turn all drawing layers off. Toggle each image in turn on and off and notice that these raster layers have different extents.
- With only ikonos_02 drawn, change the display scale to about 1:500 scale. You are now so close to the image you can see the cell structure.
- Using the Identify tool click on one of the cells. Note the numbers it contains. These numbers represent the colour display values.
- Click the Go Back to Previous Extent button (blue arrow).
- Next, draw only the campus20cm_2010 or campus_2014 image. Right-click the campus image layer and select Zoom to Layer.
- Zoom In on the UNBC Campus.
From the table and figure above, you will read that this image is a digital colour airphoto taken in 2010, having a resolution of 20 cm. Change the display scale to 1:1,000. Note the detail you can see in the buildings, light standards, cars, curbs etc.
- Turn off the campus image layer (Remove the checkmark).
- Turn on the bcgov_93 layer. You should now see the black and white 1993 digital airphoto. This airphoto’s resolution is 1 meter.
- Zoom Out until the image no longer looks fuzzy. Pan around the campus area again. You should notice less detail for this image compared to the 25 cm resolution colour airphoto.
- Turn on only the ikonos_02 layer and note the loss of detail for the campus at this image’s 4m cell resolution.
- Turn on only the spot_06 layer and note the loss of detail for the campus at this image’s 5m cell resolution.
Did you notice any landscape changes or new buildings for the images from more current years? e.g. look at campus features 1993 versus 2014 (or 2010).
4. Tour of Vector Maps
You will now tour a map and see examples of current features created post-1996 missing from the vector data. After the tour is finished, you will have the opportunity to update some of these features.
- Open the Map Document K:\geog205\data_input\myedits\fix_map.mxd
Here is an example of some of the official NTDB layer names you will see in the Table of Contents:
Water bodies (lakes).
Buildings (as polygon features)
File Naming Convention:
These are the original naming conventions for these files. This is not a testable item. However, here is how to interpret the NTDB vector file names:
The file name contains three parts: NTS Map Name _ Stamp _ Geometry
NTS Map Name: 093G15
Stamp: golf_co (golf course)
Geometry: a (area – also known as a polygon)
The three geometries are p = point l = line (and t=track) a = area (polygon)
A geometry is also known as a feature class. The three feature classes we refer to most often are point, line and polygon.
Begin your tour:
- Right-click Tour_Stop_One –> Zoom to Layer (UNBC Campus)
- Add Data L:\labs\geog205\gps_editing\spot_06.tif
This raster has been added to the bottom of your Table of Contents.
- Remove the drawing checkmark for 093G15_vegetat_a.
- Turn spot_06.tif on and off and notice the many features you can see in the image that are missing from the vector layers.
- Right-click Tour_Stop_Two –> Zoom to Layer
- Remove the drawing checkmark for both the imagery and the forested layer 093G15_vegetat_a.
- Change the scale readout to 1:12,000.
Notice that the road is red, then gray then red again. Check the legend and notice that these symbols are paved road = 1 and gravel road = 2. In reality the entire stretch of road is paved, and does not change from paved to ‘gravel’ to ‘paved’ again.
|Red = PavedDark Gray = GravelIllustration at left: Road surfaces are out of date.Illustration at right: Gravel updated to ‘paved’.|
In order to update the map, this would be an example of correct features requiring an update to their attributes (change gravel to paved in the attribute table). After you have learned how to edit these vector features in the next section, take a crack at seeing if you can correct this road attribute problem for the road layer (093G15_road_l).
Also, note in the dashed lines in the samples above. These are no longer accessible as they have grown over, or are now part of developed, private land. These would be examples of vector features that could be deleted in order to update the map.
End of Tour
The areas visited on the tour represented some of the many features that could be updated on this map sheet.
5. Editing: Feature Updates In ArcMap
Just below is a list of editing tasks that will be carried out in sections A through E (the actual work begins in section A. below this list). Each section provides examples of how features can be created for map input.
- Add new layer for Greenway Trail captured using a GPS unit and copy it to trails layer 093G15_trial_l.
- Draw polygons for Campus Ponds in 093G15_water_b_a.
- Draw Transmission Line trail in 093G15_trail_l
- Draw a point feature for the water tower above the university campus in 093G_tower_p.
- Cut the “footprint” for the campus in 093G15_vegetat_a, the forested layer.
As you are working through the editing exercises, carefully compare screen captures of the Editor toolbar in the instructions to your Editor toolbar in the software.
A. Add new layer captured using a GPS unit
Add a local trail, the Greenway that was captured using a GPS unit as follows:
- Add Data K:\geog205\data_input\myedits\supplement\greenway.shp
- In the Table of Contents, right-click the greenway layer – Zoom to Layer. Change greenway’s line symbol to a thick, colourful line so that it is easy to see.
- Toggle greenway on and off and on again to ensure you can see its line features.
This trail is an example of updates captured with a GPS unit and downloaded from the unit to the computer.
Next, you will be copying the GPS’d Greenway Trail lines from Greenway into 093G15_trail_l layer. Remind yourself of the features in the trail layer by toggling 093G15_trail_l off and on.
- Turn on the Editor Toolbar: Main Menu –> Customze –> Tool Bars -> Editor
- Click on Editor -> Start Editing (select myedits folder (in the bottom half of the selection panel)
Copy and paste the Greenway Trail into 093G15_trail_l as follows:
Select all the lines in the greenway layer as follows:
- In the Table of Contents, right-click the Greenway layer and chose Selection->Select All.
You have now selected the lines in the greenway layer.
- Now click the Copy button (or Edit –> Copy) and then click Paste button (found in the Standard toolbar – or Edit –> Paste).
- Choose the 093G15_trail_l layer when asked to select the layer to paste the features into
You have just copied the selected lines from greenway into the edit session target, 093G15_trail_l.
- Click the Clear Selected Features button.
- Remove Greenway from the Table of Contents (right-click greenway, select Remove).
- Click the Editor menu and click Save Edits from the down-drop menu.
Note the new trail lines in 093G15_trail_l for the Greenway trail. They now have the same symbol as 093G15_trail_l
You may wish to change the line symbol in 093G15_trail_l to make the trails more easy to see.
B. Draw Transmission Line trail in 093G15_trail_l
C. Create Polygons for Campus Building in campus_buildings layer
- Turn off spot_06 and navigate to the UNBC campus.
- Add Data: L:\labs\geog205\gps_editing\campus_2014.tif be patient as it loads – (if it takes to long to load or work with – use L:\labs\geog205\gps_editing\campus20cm_2010.tif instead
Three building footprints need to be added to campus_buildings.shp
- Teaching and Learning
- Sport Centre
Refer to the image below to see the locations of these newer buildings (click to enlarge the image).
- Zoom In to campus area.
- In the Editor toolbar we must start editing again and select our directory as before
- but we must ensure the campus_buildings is the editable target layer in Create New Feature window (as we did with the trail_l layer)
- Turn other images and layers off and just leave campus (tif file) image layer on
Before you begin:
The polygon will behave like an elastic band. Each click of your mouse creates an x,y coordinate known as a vertex and will be seen as a green square (examine illustration below, right). Plural of vertex is vertices.
- Draw a Zoom In box around the Sport Center.
- Click on the Straight Segment as before
- Select the Polygon tool from the Construction Tools sub-panel and draw the NSC
- Now begin clicking along the outline of the Sport Center.
- To finish a polygon, hold your mouse over the last, red vertex, right-click and select Finish Sketch from the pop-up menu.
Read this whole checklist for ideas on how to change edits:
- If you wish to abort and start your polygon from scratch, hold your mouse over a vertex, right-click and select Delete Sketch from the pop-up menu.
- To delete a polygon, click on the Edit tool, click on the polygon to delete so that it is selected, then click the Delete button, or keyboard Delete (not backspace) key.
- Undo button : float your mouse over the Undo button and note its pop-up. For example it may say Undo Last Vertex.
- To delete just one vertex: Hold your mouse over the vertex, right-click and select Delete Vertex.
- Once the polygon is finished, you can move a vertex: Click on the Edit tool and double-click on top of the polygon (which engages the Edit Vertices mode and panel). Its fill changes to an open polygon with green boxes for vertices. Using the Edit tool, click on a vertex and drag it to a new position. Right-click mouse over moved vertex – Finish Sketch.
- Once a polygon is finished, you can add an additional vertex to a line segment and then move that vertex to re-shape the line: Right-click your mouse over top of a line segment – select Add Vertex. Then move the vertex as required.
- Editor – Save Edits
- Now trace the footprint for Teaching and Learning and BioEnergy buildings
- Editor – Save Edits to save the features
Each building has a name which stored in the attribute table. For the three new building footprints, there is no name information available. We can add these information to the attribute table.
- Using the Editor toolbar and it windows, ensure the campus_buildings is the editable layer as before
- Click the Attribute tool button on the Editor toolbar(hover until you find it – towards the right end of the toolbar). The attribute table window will open
- Click the edit tool and click the Sport Centre polygon. The attribute information of Sport Centre is displayed in the attribute table. Notice that there is no name for this polygon.
- Click the Value field of Name and type in “Sport Centre”
- Now in the same way, give a name to Teaching and Learning and BioEnergy building respectively (note: remember to put quotation mark at beginning and end of the string.
- Save your edits.
D. Draw a point feature for a water tower above the campus in 093G_tower_p
Change the scale readout to 1:10,000. You should now be able to see the water tower. It is located near 511160, 5971700. Move your mouse and watch the coordinate readout lower right in the software. Find this feature by moving your mouse and watching the coordinates change. Or you could use the Go To tool.
- Turn on spot_06
- Next, zoom to the feature, and make sure you are at the correct location.
- Make the point layer 093G15_tower_p the target of your edit session:
|The Create New Feature should be open with the tower_p layer selected.
You have completed some of the many updates needed for NTDB 093G15.
In summary, map updates may include:
- Creating new vector features from imagery or capturing new features with a GPS.
- Changing feature attribute values that are out-of-date, or are incorrect.
- Deleting features that were originally misinterpreted or no longer exist.
*Note: Missing features should be considered in context with the level of generalization associated with the map scale. For example, a missing feature may be missing because it is smaller than the guidelines for capture at the map scale.
E. Create a new spatial dataset for holding a point of interest for the David Douglas Garden
- In ArcCatalog, navigate to your home folder and go to data_input folder. You should see the myedits folder
- Right_click on myedits folder and choose New->Shapefile to create a new spatial dataset.
- Give the Name of the file to point_interest, Feature type to Points
- Click the check box beside Show Details. This will display more detailed information about coordinate system in this dataset.
- Click the Edit button. The Spatial Reference Properties window shows up allowing you to specify the coordinate system.
- Click the plus signs to navigate the available projections starting at the Projected Coordinate Systems
- Keep clicking down the tree until you can select->UTM->Nad 1983->NAD 1983 UTM Zone 10. Click the OK button.
- Click OK button in Spatial Reference Properties window to close it and click OK in Create New Shapefile window to create the new shapefile.
A new empty spatial layerwill be created. We will use this layer to store the location of David Douglas Garden.
- Click anywhere else to unhighlight the point_interest layer in ArcCatalog
- Now back to ArcMap, make sure you are still in Editing mode. Add point_interest
- Set the point_interest as the editable layer
- Add the point to this layer (the same way we did for the water tower)
- Editor -> Save Edits
6. Add the GPS Features
Getting your GPS data from you mobile device to your k: drive
You can use a data/charging cable quite easily if you have an Android phone, but as many people are using Apple phones, we will simply email the data to ourselves. The apps used in section 2 have a sharing mechanism whereby you can attach the GPX files you gathered on your mobile device in an email to yourself. You can then download the attachment to your data_input folder.
Copy data from a Garmin GPS unit to your home directory (if you used a GPS unit instead of a mobile device)
- Connect GPS unit to computer with USB cable
- Once connected, go to local Linux system and click the folder button at bottom menu bar. Wait for seconds, the drive GARMIN will show under Devices at left
- Go to the folder GARMIN->Garmin->GPX, here you will find all gpx data collected.
- You will want to copy the Current.gpx file in the Current Folder and the Waypoint file named by using today’s date (i.e Waypoints_24-JAN-17.gpx)
- Copy over these GPX files (waypoints and tracks) to your home directory /home/username/geog205/data_input (replace username with your username)
Converting the GPX fle to a GIS data file – Shapefile
For this week’s lab will use a GPX file Scott created by using the Android app from a quick walk out to the Bio Dome (used in the steps below). The GPX file is located at: L:\labs\geog205\gps_data\unbc_biodome.gpx
If you have collected both tracks and waypoints the method ARCMap below will only bring in the tracks. If you use QGIS, tracks, track points and waypoints are all imported simply by adding the gpx file as a layer. We will use QGIS later on in the course, but if you have acquired data with you mobile – you can ask Scott to show you how to add GPX data in QGIS.
- Back to Osmotar and open ArcMap and open L:\.labs\geog205\gps_editing\unbc_edtits.mxd|
- Open up ArcToolbox->Conversion Tool->From GPS->GPX to Features
- Set Input GPX file as L:\labs\geog205\gps_data\unbc_biodome.gpx and set the Output feature to a file in your data_input folder.
- The name of the output file must end with a .shp extension.
- Use the image below (click for a larger image) as a guideline for converting the GPX file
Using GPS data as visual guide to update
- Zoom In on the UNBC campus area. From the L:\labs\geog205\gps_editing\fielddata folder, add two layers: field_point.shp and campus_trails.shp
There are two strategies for working with GPS data. The first is to edit these shapefiles directly, and the second is to use the shapefiles as an underlay to guide the edits in another layer.
In this exercise, you will use the GPS features as a guide to edit in another layer. Based on your experience in the previous editing exercises (examine previous instructions for tips):
- Using field_point.shp as a visual guide, add these locations as points in point_interest
- Use the campus_trails.shp as a guide to trace it as a line feature in 093G15_trail_l.shp
- Save your edits for each edited layers
Scale Production Limitations
The map you have been updating was originally produced at 1:50,000 scale. How large should a feature be before being included in the map or how small should it be before it can be excluded from the map?
- Examine your map fix_map.mxd by changing the display scale to 1:50,000. This display scale matched the production scale of the data and the size you see on your screen would match the printed paper map.
Examine the campus at this scale. Can you see all the features you have added? Is there clutter at this display/production scale? You may wish to review your lecture notes on generalization.
7. GPS Resources
This resource is not required for the lab. If you are interested in learning more about downloading data from a GPS unit to desktop software for use in GIS, Check the following links:
- Click Start -> Logoff to logout from the Terminal Server.
- Click System->Quit->Logout from the local machines to logout the local machine.