To make a to-scale map of the Cumberland Monastery Grounds.
I undertook this project because I was unsatisfied with the existing map. While quite complete, it was not to-scale, making it less useful for exploring the Monastery grounds.
Below is a record of my own experience. It's not a certified blueprint for making maps with GPS units, though I certainly hope it's useful to somebody for doing something like that.
If you're going to use this for guidance, as with all directions, you should read the whole thing first. You don't want to find out when you're trying to download data that you forgot to put waypoints at certain places or something and have to go collect data again.
Finally, your mileage may vary. I am not a lawyer. All that jazz.
I don't have a GPS unit, but I was able to borrow one from a friend. It was a Garmin eTrex unit. The important features include the capability to store a track, or the GPS points of a particular route that I walked along, as well as a computer interface (in this case, through a serial port) so you can download the points to a computer.
This is easy. Turn the unit on, wait for it to catch all the satellites, and walk around the area that you want to map. In my case, there are a fair number of trails, many of which overlap. I created a new track for a particular segment (which usually did not have any intersections on it).
After each segment, I'd save the track and clear the unsaved track log.
If I was lazy or running short of time, I'd use one "segment" to represent a length of trail that did have intersection points with a few smaller trails. I'd create waypoints (points which the unit stores by themselves) at the intersection points. That way, later when I was making the map, I could tell where the trails should intersect without having to walk down every little trail.
It's also useful to use waypoints to mark particular points of interest which you can mark on the map (e.g., Nine Men's Misery).
However you use your tracks and waypoints, I recommend bringing a notebook and paper along to write down what's what.
First, plug in the converter, and use dmesg(8), which shows you a kernel log, to verify that Linux detected it. After typing dmesg at the prompt, the last few lines should say something about the serial converter, including which device it is connected to. In my case, that was /dev/ttyUSB0.
If this fails, you may need to load the appropriate kernel module (driver) for the device. I believe the module was called usb-serial. To install it, as root, type modprobe usb-serial. You can use lsmod(8) to verify that it's there.
I also sometimes needed to recreate the device nodes to get the ttyUSB device to show up. I did this with /etc/init.d/udev restart, though this incantation may vary with the distribution you're using.
Now connect the GPS device to the serial converter and turn it on. Make sure that it's setup to output the standard Garmin data. (Sorry, I forgot exactly what menu options were required for this.)
You can cat /dev/ttyUSB0 to see if it actually worked. You can have the Garmin unit output raw data, and you'll periodically see text indicating the unit's position spewing out. Make sure to set it back to downloading Garmin format data before you continue.
Many programs can be used to download the data, once the ttyUSB device is set up properly. The most flexible of these is probably gpsbabel. With this tool, you can specify the input format (garmin) and the output format you would like the data in, like:
gpsbabel -i garmin -f /dev/ttyUSB0 -o $OUTPUT_FORMAT -F $OUTPUT_FILE
You should, of course, choose a suitable output format and filename. GPX seems like a pretty common standard, so I used that.
This dumps all the track data into one big file. I separated and labeled the tracks (by manually editing the XML file). Remember, each of my tracks was a trail segment. I recommend separating them like this so you can keep them straight later, color-code them, etc.
You can use a similar command to download the waypoint data. I also separated that, and manually labeled each point.
I recommend you skip to Step 4 now, but I figured I'd include this information in case somebody can't get gpsbabel to work.
I was also able to download the data successfully with gpstrans. Actually, I found this tool first. Since I was only borrowing the unit, I wanted to make sure I had all the raw data I had collected. So the first thing I did was to download it with gpstrans to some plaintext format including mainly the coordinates. The incantation was something like:
gpstrans -p /dev/USB0 -dt > SOME_OUTPUT_FILE
I then used gpsman to look at the data that gpstrans spat out. I found the interface pretty clunky, though I was able to view the data in a useful way (e.g., it drew the paths I'd walked on). So I found a different tool.
I downloaded and installed qgis to process the data. The newer versions are much better, so make sure whatever package you install (if you're on Debian or something) is pretty new. It might be worth building from source, but you can see if the stock version has the features you want.
First, activate the GPS tools plugin. With menus, that's Plugins -> Plugin Manager, and check the box for GPS Tools.
Now import each of the tracks. From menus, that's Plugins -> GPS -> GPS Tools. The default tab says "Load GPX file". Choose the file, and which features to import from it, and click OK. You have to do this (and the following steps) for each track.
The new track will show up in the "Layers" menu at left. Right-click it, and choose Properties to edit such properties as the line color and thickness.
Similarly, import the waypoints file. I had manually labeled these. Under the properties for that layer, you may want to check "display labels," and indicate which field in the file contains the label to display. This corresponds to the XML tag which surrounds the label.
(In other words, for each waypoint, you can have something like <comment>Name of point</comment>. Then make sure the source field containing label is set to "comment".)
You can also adjust the appearance of the waypoints: what side the labels appear on, etc.
By now, it should look mostly like a map. You have your various trails showing up in nice, pretty colors, and you have interesting points marked and labeled. qgis has a few other options, like adding a compass rose and scale bar. These are under the "Decorations" plugin, though I never really got the scalebar working properly.
To make a more finished product, click File -> Print. This brings up the useful browser. It's a bit strange to use, but reasonably powerful. This is one feature for which I had to upgrade the version of qgis installed by default on my Breezy system.
First, adjust the paper size, orientation, and resolution in the "General" tab at right.
Click the second button on the toolbar (an icon of a map with a plus sign). Now draw a box filling most of the page.
If each of your tracks is a different real-world trail or something, you might want to add a legend with the next button. A scalebar would also be really useful, but I've had much trouble getting it to work.
Now add some text: a title and maybe some non-point-based labels or something.
Finally, you can choose to print it, or export it as an SVG (scalable vector graphic) or bitmap image. I recommend SVG, as it can be scaled to various sizes without losing quality.
If you want, of course, touch it up in the Gimp or KolourPaint or something.
Last updated July 4, 2006