Lab VI: Image Segmentation Preface; GPS data

 

Updated 2/2/2009

 

Outline of Document (Click on links to jump to a section below):

Introduction

The Study Area

Level III LULC Codes

Garmin GPSmap60-C Intro

Garmin GPSmap60-C Basic Operation

    Garmin GPSmap60-C Create Waypoint (Ground Truth Site)

    Garmin GPSmap60-C Data Download

    Reproject Data from WGS84

    Move or Offset Points

    Add Coordinates to Attribute Table

    Delete Waypoints from Garmin

What if can't get my data to download from the Garmin?

What to turn in when?

 

 

 

Introduction; Ground Truth Data: Prior to taking on our Image Segmentation Exercise, we will need to collect some additional ground truth data.  Since we are working with high spatial resolution imagery, we will need to collect data on some additional LULC classes and pay more careful attention to accuracy.  For our earlier ground truth dataset, we were working with Landsat imagery so as long as the coordinates for our ground truth points were within 50m or so of their “true” position, this was fine.   For our image segmentation exercise, we will need ground truth data with a much higher spatial accuracy.  The coordinates for our ground truth points will need to be accurate to within a meter or two!

 

When you are out in the field, be very careful with your offsets and carefully screen each of your points when you get back to the lab.

 

The Study Area: Prior to going out into the field, take a look at the image. The image is located on the J-drive in the class subdirectory under J:\saldata\Esci442\bham2004cir and the image name is wwu2004cir_1m_utm.img.  Grab the .rrd file as well.  As you will see, the image provides lots of detail.  The pixel size is one meter.  You might want to print out a paper copy of the image to take with you into the field.  In order to help you avoid wandering off the edge of the image when you get into the field, you should refer to these coordinates:

 

            Northern boundary UTM coordinate: 5,400,000 m N

            Southern boundary UTM coordinate: 5,396,700 m N

            Eastern boundary UTM coordinate: 539,600 m E

            Western boundary UTM coordinate: 536,300 m E  (note that this is out in Bellingham Bay)

 

For each ground truth point, make sure that your Y coordinate is (the northing) is between the northern and southern boundary and that the X coordinate (the easting) less than 539,600.

 

Size of ground truth sites:  Make sure that each ground truth site that you select is from a LULC type that is at least 5 meter by 5 meters.  Even bigger than this would be great but this will not always be possible.

 

Here is what the image looks like:

 

 

Level III LULC codes: Since we have a more detailed image we will try for a bit more detail in our classification.  In the previous exercise, we focused on the Level II LULC codes.  For this lab, we will try to use Level III codes where possible.  The complete list of LULC codes that I would like you to use is included below.  You may collect data for any of these cover types but I indicated the cover types that I would like you to focus on as you collect data. 

 

Anderson LULC Codes for Whatcom/Skagit Co. with brief descriptions

 

 

 

 

 

Target

Level I

Level II

Level III

 

Cover types

1

 

 

Urban or Build up lands

 

 

11

111

Residential- Single Family housing units

X

 

      11

112

Residential-Multifamily housing units

X

 

12

     120

Commercial and Services buildings (including educational buildings)

X

 

13

     130

Industrial buildings

X

 

14

141

Transportation, asphalt surface road or sidewalk

X

 

14

142

Transportation, cement surface road or sidewalk

X

 

14

143

Transportation, brick sidewalk

X

 

14

144

Transportation, gravel surface road

X

 

 

 

 

 

 

14

146

Utility-Right of Way

X

 

15

     150

Industrial and commercial complexes

 

 

16

     160

Mixed urban or build-up land

 

 

17

172

Shrubs, planting areas (not grass)

X

 

17

173

Artificial turf

X

 

17

174

Other Urban

 

 

 

 

 

 

2

 

 

Agricultural lands

 

 

21

211

 

Crops

 

 

 

21

212

Pasture (includes any large grassy area such as athletic fields)

X

 

22

220

Orchards, vineyards, nursury, berry fields

 

 

23

230

Confined feeding operation

 

 

24

240

Other Agricultural lands

 

 

 

 

 

 

3

 

 

Rangelands (natural)  We do not have any of these in our area

 

 

31

310

Hebaceous rangeland

 

 

32

320

Shrub and brush rangeland

 

 

33

330

Mixed rangeland

 

 

 

 

 

 

4

 

 

Forest lands

 

 

40

400

"Recent" clearcuts (since 1972) not a standard Anderson LULC code

 

 

41

410

Deciduous forest

X

 

42

420

Conifer forest

X

 

 

 

    (note that this could be further subdivided into age classes; e.g. young, mature, old-growth)

 

 

43

430

Mixed forest

 

 

 

 

 

 

5

 

 

Water

 

 

51

510

Streams and canals

 

 

52

520

Lakes

 

 

53

530

Reservoirs

 

 

54

540

Bays and estuaries

 

 

 

 

 

 

6

 

 

Wetlands

 

 

61

610

Forested wetlands

 

 

62

620

Nonforested wetlands

 

 

 

 

 

 

7

 

 

Barren lands

 

 

71

710

Dry salt flats

 

 

72

720

Beaches

 

 

73

730

Sandy areas other than beaches

 

 

74

740

Bare exposed rock

 

 

75

750

Strip mines, quarries and gravel pits

 

 

76

760

Transitional areas

 

 

77

770

Mixed barren land   (use this for bare exposed soil)

 

 

 

 

 

 

8

 

 

Tundra (Alpine)

 

 

81

810

Shrub and brush tundra

 

 

82

820

Herbaceous tundra

 

 

83

830

Bare ground tundra

 

 

84

840

Wet tundra

 

 

85

850

Mixed tundra

 

 

 

 

 

 

9

 

 

Perenial snow and ice

 

 

91

910

Perenial snowfield

 

 

92

920

Glacier

 

 

 

 

 

Garmin GPSmap60: Given the difficulties we had last time with the old Trimble GeoExplorer3s, I’d suggest that we use the newer Garmin GPSmap60s.  We have more of these units and they are a little easier to use.  There are three disadvantages of the Garmins:

1.)    We can’t program them with a data dictionary.  You will need to refer to the table below for the LULC codes and record this information yourself.  We will need to rely more on good note-taking in the field.  For each point, you can enter a waypoint ID# into the GPS unit in the field and then take notes regarding the LULC code for this ID#.

2.)    The Garmins don’t have the offset feature.  In your field notes, you can record the bearing and distance to your intended location.  Back in the lab, you will “move” the point to this location (more on this below).

3.)    Although you can make the Garmins display coordinates in UTM NAD27, these coordinates are actually stored and download using the WGS84 datum.  This means that, back in the lab, we will need to convert your coordinates from WGS84 to UTM NAD27 (more on this below).

 

Field Data collection:  As in the previous GPS exercise, I would like each of you to log at least 10 ground truth points.  Feel free to work in groups if you would like.  While you are in the field, I would encourage you to log the positions on the Garmin GPS units (as explained below) and you should also record coordinates, LULC codes and any offset information for each point using a pencil and paper as a backup. Your field data collection form might look something like this:

 

Northing (m)

Easting (m)

Level III

Site

Site ID#

Y-coordinate

X-coordinate

LULC code

Description

Comments

DW1

5397690

537909

212

Grass

DW2

5397730

537857

120

Commer. Bld.

Parks Hall; actual location about 30m North of logged position

 

 

 

 

Basic Operations For the Garmin GPSmap60-C GPS Receiver

(These instructions are modified from a document prepared by Stefan Freelan: J:\saldata\tut_GPS\Garmin_GPSmap60\3_GPSmap60_howto.doc)

 

Turn Unit On       - Press & hold Power button (top of unit next to antenna)

                             - Unit comes on and searches for satellites (wait…)

                             - Opens to Satellite screen with the Location and

                                      Accuracy Estimate at the of the screen

 

Turn Unit Off       - Press and hold the Power button (top of unit)

 

Switch Screens   - Press Page button (on right side) to switch between the

                             5 Main GPSmap60 Screens:

                                      Satellite – skyplot of satellites & satellite strength

                                      Trip Computer – Info on speed, bearing, ETA, etc.

                                      Map – w/waypoints & cities, can pan/zoom

                                      Compass – w/info on speed, ETA, etc.

                                      Main Menu – settings, manage tracks, etc.

                             * Note: the GPSmap60-CS also has an Altimeter screen

 

Navigating within the GPSmap60 Screens and Selecting Items

                             - Use the Rocker Button (large, center button w/arrows)

                                      to “navigate” Up-Down-Left-Right to highlight items

                             - Press ENTR (Enter) button to select a highlighted item

 

Zoom In/Out       (on the Map screen)

                             - Use the OUT button (upper right) to Zoom Out

                             - Use the IN button (upper left) to Zoom In

 

Backlight On/Off          - With unit on, press Power button (top) once briefly

- Use Rocker button to adjust up/down as desired

- Backlight goes off in 15 seconds (or press ENTR)

 

Change Units (Note that this step is critical!!!)       

- Main Menu screen

                             - Select Setup, select Units

                             - Adjust Position Format to:      UTM UPS

                             - Adjust Map Datum to: NAD27 CONUS

                             - Adjust Distance to: Meters

 

Time of Day         - Bottom of Main Menu screen

 

Check Battery     - Top of any screen

 

Set Battery Type - Main Menu screen – Select Setup – Select System

                             - Under Battery Type, choose either:

Alkaline (disposable) or

NiMH (Nickel Metal Hydride – Rechargeable)

 

Change Battery   - Lift metal loop on back of unit

                             - Turn loop counterclockwise 1/4 turn

                             - Remove back cover, replace batteries (2 AA)

                             - Replace cover, turn loop clockwise 1/4 turn and fold flat

 

* * * Turn Unit OFF when not in use to save battery * * *


 

 

 

How to CREATE a Waypoint

 

Press Mark button, then from the Mark Waypoint screen:

 

          Enter a Name for the new waypoint (this is your site ID#; you might consider using your initials and a #, ex. DW1)

                             - Use Rocker & ENTR buttons to highlight the name at the

                                      top of screen (by default a number 001, 002, etc)

                             - Use Rocker & ENTR buttons to select letters (to ‘type’)

                             - When done entering letters, highlight OK on the

                                      keyboard & press ENTR to close keyboard screen

 

          Choose an Icon to represent the new waypoint on the map (Optional)

                             - Use Rocker & ENTR buttons to select the marker

symbol (by default a flag, next to name)

                             - Use Rocker & ENTR buttons to select an icon

 

Average multiple positions for better accuracy (Critical for our application!!!)

                   - Use Rocker & ENTR buttons to select AVG

                   - Wait… (counter = # of positions to be averaged) (suggest you go for at least 20 positions)

                   - Use Rocker & ENTR buttons to select SAVE

                   - Make sure you hit OK (see below) to Record Waypoint

 

Record Waypoint - (this is not Optional and must be done in addition to any of the Optional steps above)

- Use Rocker & ENTR buttons to select OK at the bottom of the Mark Waypoint screen

 

 

 

 

Data Downloading Back in the Lab: As with the previous data collection effort, it will be critical for you to overlay each of your points on our image to insure proper alignment and to move any points if needed.  The following instructions (edited from those created by Stefan Freelan: J:\saldata\tut_GPS\Garmin_GPSmap60\4_GPSmap60_to_ArcMap_transfer.doc) will walk you through this process.

 

Transferring GPS Data from the Garmin GPSmap60 to ArcMap

 

NOTE: These instructions assume a certain degree of basic Windows operating system fluency (coping files, creating folders, opening multiple applications, etc). If you do not understand the instructions, please ask for help.

 

These instructions are specific to the Spatial Analysis Lab (AH-16) computers and are customized for local (Bellingham, WA) data and coordinate systems (UTM NAD27). Adaptations will need to be made for other computers and/or other areas.

 

You will need a Garmin GPSmap60-PC connection cable (hooks into the back of the GPS unit and the PC), found on most SAL PC’s.

 

OPTIONAL: See also J:\saldata\tut_GPS\Garmin_GPSmap60\Using_DNRGarmin.doc for an alternative method of downloading data…

 

1. Connect the Cable

Connect the cable (from the back of the computer) to the GPSmap60 (open the large rubber cover at top, right hand side of the back of the unit and plug in the 4-prong connector). Note: the cable only fits one way into the GPSmap60.

DO NOT FORCE IT – line up the small notch of the plug with the guide.

 

2. Turn GPSmap60 ON (if it’s not already On)

  • Press and hold Power button on the top of the unit (next to antenna).
  • If/when prompted (because you are indoors), choose ‘Use with GPS off’

 

3. Open a Pre-made ArcMap project file

  • Open Windows Explorer or My Computer
  • Browse to the J:\saldata\esci442\segwwu folder
  • Double-click on wwu2004cir_1m_utm.mxd to open a pre-made ArcMap       project (a simple map of the south WWU campus)
  • If necessary, right-click in the white space around (outside of) the map page and choose Zoom Whole Page

 

4. In ArcMap Add the GPSi Toolbar

  • Click on the View menu and choose Toolbars
  • Check the GPSi (not the GPS) toolbar option

 

5. Download Waypoints (or Tracks) from the GPSmap60

  • From the GPS Interface toolbar, click the dropdown arrow and choose Waypoints (or Tracks) and click on Download…
  • In the Download… dialog box choose the Waypoints (or Tracks) that you wish to download (there is an All button on the right) and click on Save.
  • In the Save… dialog box browse to the C:\temp\ folder (or your desired location), enter a name for your new GIS shapefile and click Save
  • Repeat for Tracks and/or other Waypoints as desired…
  • When done, turn the GPSmap60 OFF and remove the cable

 

6. View your data in ArcMap

Your GPS data should be added automatically to the existing ArcMap project. NOTE: If your new shapefile does not show up in your Table of Contents (the list of data layers on the left side of the screen), click on the Source tab at the bottom of the Table of Contents, then click on the Display tab to refresh the list.  At this point, you points will not line up well at all with your image.  Each point will probably be off by about 100m.  Don’t panic!  This is because your points come in from the Garmin unit using the WGS84 datum but our image is in UTM NAD27.  We need to reproject the coordinates.  This is a multistep process.

 

6a. Reproject from WGS84 to NAD83: In ArcToolbox, go to Data Management Tools-Projections and Transformations-Feature-Project

          Input Dataset or Feature Class: shapefile with your points

          Input Coordinate System: WGS84 (this is the default)

          Output Dataset or Feature Class: shapefile_NAD83

          Output Coordinate System: click on the button to bring up the Spatial Reference Properties Dialog box- click Select.

Navigate to Projecied Coordinate Systems-UTM-NAD83-NAD 83 UTM Zone 10N.prj  Click Add

Click Apply-OK

          Geographic Transformation (optional): (not really optional!!!): Select NAD83 to WGS84

          Click OK.  A Project Dialog box will open and inform you that the transformation is complete but you will get a Datum conflict between map and output warning message.  Ignore this.

 

6b. Reproject from NAD83 to NAD27: Again, In ArcToolbox, go to Data Management Tools-Projections and Transformations-Feature-Project

          Input Dataset or Feature Class: shapefile_NAD83 with your points

          Input Coordinate System: NAD1983_UTM_Zone_10N (this is the default)

          Output Dataset or Feature Class: shapefile_NAD27

Output Coordinate System: click on the button to bring up the Spatial Reference Properties Dialog box- click Select.

Navigate to Projecied Coordinate Systems-UTM-NAD27-NAD 27 UTM Zone 10N.prj Click Add

Click Apply-OK

          Geographic Transformation (optional): (not really optional!!!): Select NAD_1927_To_NAD1983_NADCON

          Click OK.  A Project Dialog box will open and inform you that the transformation is complete

 

Your points should now line up much better!

 

6c. Moving/Offsetting points: If one of your points does not line up perfectly or if you want to offset one of your points (e.g. you logged a position adjacent to a building but you want your point to be centered on the roof of the building), you can change this.  Go to the Editor dropdown and select Start Editing start_edit.  Then left click once on a point to select it, then Left click, hold and drag the point to the correct location.  When you are finished editing all points, go to Editor-Save Edits, then Editor-Stop Editing.

 

6d. Adding coordinates to the Attribute table: If you open the attribute table for your points, you will note that it does not include the coordinates for your points.  To add this information to the attribute table, go to the ArcToolbox and select WWU Tools-Add XY Coordinates.  Then simply specify your points file as the Input Feature and click OK.  Reopen your attribute table and the coordinates should be there.  At this point, all you need to do is export the attribute table and save it as a .dbf file.  You can open this in Excel to double check it and then e-mail it to me.

 

                                               

Other stuff you can do in Arc:

 

Improve the Symbology for your GPS data

  • Double-click on the name of your new waypoints (or tracks) shapefile in the Table of Contents to open the Layer Properties.
  • Click on the Symbology tab.
  • Click the Import button.
  • Click the drop-down arrow next to the Layer box and choose Point (or TRACK, as appropriate)
  • Click Ok. Click Ok again.

 

Explore your data using ArcMap

  • You can turn your GPS data layers ON or OFF (so they are visible or not) by checking the box next to the name in the Table of Contents
  • Use the Pan tool (an open hand icon) to move left/right
  • Zoom in/out using the Zoom tools (the icon w/four arrows pointing in for Zoom In, icon w/four arrows pointing out for Zoom Out)
  • You can use the Measurement Tool (the icon that looks like a ruler) to determine how far (in meters) your GPS data varies from the photo
  • Click on a waypoint or track using the Identify tool (the i in a circle) to get the name, elevation, etc. of a waypoint or track

 

OPTIONAL: Print your map

  • From the File Menu, choose Print

 

OPTIONAL: Create and save a .jpeg graphic of your map

  • From the File Menu, choose Export Map
  • In the List Files of Type box (lower left) scroll down and choose .jpeg
  • Browse to your U:\ drive, C:\temp\ or desired location to save your file
  • Enter a name in the File Name box
  • Click OK to export your map to a .jpeg graphic (this graphic could be inserted into a PowerPoint slideshow, a Word document, a web page, etc.)

 

7. OPTIONAL: Save your Map (to your U:\ drive)

  • Save your .mxd (File / Save As) to your U:\ drive or desired location
  • Close ArcMap (File / Close)

 

8. REQUESTED: Please Remove Files from the GPSmap60

 

Delete Waypoints:     - Press the FIND button and select Waypoints

                             - Press the MENU button

                             - Use Rocker & ENTR to select Delete

                             - Choose All Symbols & press ENTR

                             - Use Rocker to highlight Yes & press ENTR

 

Delete Active Track:  - On the Tracks screen, use the Rocker to highlight Clear

- Press ENTR

                             - Use Rocker to highlight Yes & press ENTR

 

Delete Saved Tracks:          - On the Tracks screen, press the MENU button

                             - Use Rocker & ENTR to select Delete All Saved

                             - Use Rocker to highlight Yes & press ENTR

 

***End of Stefan’s instructions***

 

 

What if I can’t get my points downloaded from the Garmin?  If you can’t get the download to work, there is another option, assuming that you have good field notes.  Go to Excel and enter your data in a format that looks like this:

 

SiteID

Ycoord

Xcoord

LULCcode

DW1

5397690

537909

212

DW2

5397730

537857

120

 

NOTE THAT THERE ARE NO SPACES IN THE COLUMN HEADER NAMES AND NO SYMBOLS!!!  Now go to File-Save As-Other Formats and save it as a “CVS (comma delimited)” file.  This is a comma-delimited text file.

 

Then Open a Pre-made ArcMap project file

  • Open Windows Explorer or My Computer
  • Browse to the J:\saldata\esci442\segwwu folder
  • Double-click on wwu2004cir_1m_utm.mxd to open a pre-made ArcMap       project (a simple map of the south WWU campus)

 

In the Arc main toolbar, go to Tools-Add XY Data.  In the Choose a table…. box, navigate to your .cvs file and then select the appropriate columns for the X and Y data values.  Select OK and your points should plot on the image.  Since you recorded these values directly from the Garmin in UTM NAD27, they should plot properly with no need to reproject.  You may still need to Move or offset these points.  If so, the easiest way to do this is simply to move your cursor to the correct location on the screen and note the UTM coordinates for this location at the very bottom of the Arc window.  Then go back into Excel and enter these values into the correct column/row. 

 

 

 

What To Turn In When:  After you have checked all of your points, turn them in to me no later than Monday, 2/16 at 9:00AM.  I need time to check all of your data prior to lab on Wednesday.  You should email your data to me as a .cvs file using this format:

 

SiteID

Ycoord

Xcoord

LULC

DW1

5397690

537909

212

DW2

5397730

537857

120

 

Please use the exact column headers used above.  Any spaces or goofy symbols in these labels (ex. _ - # …) will cause problems for me.

If you have any problems or questions, don’t hesitate to ask for help.

 



Return to ESCI 442 Lab Page

Return to ESCI 442 Syllabus

Return to David Wallin's Home Page