Geodetic-quality GPS units are usually able to output data directly into a GIS-friendly format like shapefiles, either with built-in software or with add-on packages like Trimble’s Terrasync or ESRI’s ArcPad. But what if you have a consumer-grade GPS unit without the ability to run this software (or you don’t feel like coughing up hundreds of dollars to buy a copy)? This post and the next one will cover some options for downloading data directly from a GPS and converting it to the GIS-friendly shapefile format. First up – an easy solution for Garmin GPS owners.
If you’re using a Garmin GPS unit to gather data for GIS, you have to get a copy of DNRGarmin. Minnesota’s Department of Natural Resources produces this tool, and has generously released it for use by the general public. While it can connect with any serial GPS unit via the NMEA interface for position measurements, it can only download waypoints, routes and tracks from Garmin units, and there are a few Garmin units it won’t work with (e.g. the iQue series). But it should work fine with the vast majority of Garmin units past and present, and it supports both serial and USB connections.
After downloading and installing the program, hook up your Garmin unit to the your computer, turn it on, and run the program. DNRGarmin should determine that you have a GPS connected; if it doesn’t, go to the GPS menu, and make sure the right port is selected. Once the GPS is recognized by the program, you can go to the Waypoint, Track or Route menu to Upload data from your GPS. Here’s a screenshot of DNRGarmin after a set of tracks has been uploaded:
The data table lists off all the combined track points that have been uploaded, with a track identifier and position for every one (altitude as well if it’s a 3D fix). You can modify, or even delete, individual track points in the data table.
Shapefiles come in three basic varieties, point, line and area/polygon, with each type only able to hold data of a particular type. In other words, if you have a point shapefile, you can’t put lines or areas into it. While that holds true for saving data in DNRGarmin in shapefile format, you do have a choice of what format you save data in. Suppose you have a track that describes the perimeter of a particular area you’re interested in. If you download that track data, DNRGarmin gives you the option of saving the data in any of the three shapefile types:
- Point – Every point in the track is saved as a single point vertex in the shapefile
- Line – The track is saved as a line shapefile, with every track point as a vertex
- Polygon (area) – The track points are treated as vertices describing an polygon, with the first and last points in the track automatically connected together to complete the polygon perimeter.
If you download a set of individual waypoints that describe a line or an area, you can also save those as a line or polygon shapefile as well. After downloading the individual waypoints, just select “Track” or “Route” from the radio buttons near the top, and DNRGarmin will let you save those points in line or polygon shapefile format (if you leave the radio button in “Waypoint”, you’ll only be able to save those waypoints as a point shapefile).
To create the shapefile, first determine which points you want to save as the shapefile. If you have multiple tracks, for example, and only want to save one track in its own shapefile, you could delete all the points from other tracks that you don’t want. But DNRGarmin also lets you select sets of points in the data table; if any points are selected, then only those points will go into the shapefile you create.
Next, go to File => Save To => File, and select shapefile from the “Save as type:” dropdown box. You’ll have two options, unprojected and projected. Unprojected will create a shapefile in the WGS84 geographic coordinate system, latitude and longitude; projected will create a shapefile in whatever coordinate system and datum you’ve specified in File => Set Projection menu (default is WGS84, geographic). If your GIS can handle projection on the fly, or if it has a shapefile coordinate system converter, you’re probably better off saving shapefiles in DNRGarmin in unprojected form. If the Track or Route radio buttons were selected, DNRGarmin will now let you choose whether you want to save in Point, Line, or Polygon shapefile format; if Waypoint was selected, it will automatically create a point shapefile.
If you’re not familiar with shapefiles, I should note that a single “shapefile” actually consists of at least three files, with the .shp, .shx, and .dbf suffixes. The .shp contains the position data, the .dbf contains information about every shape (e.g. name, altitude, etc.), while the .shx is an index file that connects the two. DNRGarmin also creates a fourth file, with the .prj suffix, that describes the coordinate system and datum associated with the shapefile. Some GIS software can read this .prj projection file automatically and use it to assign the right coordinate system to the shapefile.
Here’s a screenshot from a GIS that has a shapefile created from a GPS track using DNRGarmin, laid over a USGS topo for the same area:
DNRGarmin comes with a first-rate help file; there’s also an excellent PDF manual available from the US Forest Service on how to use the program. DNRGarmin is so good that if you’re thinking of buying a GPS unit for use in acquiring data for GIS, it could be a major factor in determining which brand of GPS you buy. In the next post, I’ll talk about options for other brands of GPS units, and you’ll see that it takes more steps, and is a bit more difficult, to get their data into GIS format than it is with Garmin units using DNRGarmin.
Addendum: Hey, I forgot to point out that if you have ArcGIS 8.x or 9.x, you can use DNRGarmin as a plugin to these programs for direct import of GPS data. See the DNRGarmin website for details.