2007-08-15

Digital Mapping Basics

GPS equipment can be a lot of fun. Finding out where you are, or sharing your trips with others, adds a whole new dimension to traveling. Most of the time, it's easy. You take the software that came with your GPS, download the tracks, and share them with other people. However, problems can creep in when that sharing starts. What if they don't have the same type of GPS or software? Why does that track you downloaded from the web not show up on the map where it's suppose to? This post is the first in a series to help explain how to take your digital mapping to the next level, or at least to help explain why your downloaded hiking track shows up in the middle of the ocean. The series starts with some digital mapping fundamentals before getting into some available software, and the technical details of conversion.


Digital Mapping Fundamentals:

The first thing you have to understand about digital maps is that there are fundamentally two different kinds: raster and vector. A raster is just like a digital picture, or your monitor for that matter. A raster image is just an array of dots, across and down, where each dot can be a particular colour. If you want to draw a line, you just turn the dots on from point A to point B, and it looks like a line. The pictures you take with your digital camera are raster images. Vector images are different. A vector image is actually a collections of lines, polygons, or points that are listed as descriptions, such as: line, starting at 50x80, ending at 230x100, thickness 2, color green. The computer program then takes than information and calculates what you should see on your monitor. Now, the end result is always the raster image on your computer monitor, but the underlying data can be raster or vector. Vector data is very important to digital mapping. I don't want to get lost in a lot of technical details here, so if this isn't clear, try reading Graphic File Types for more background information.

Vector data is a collection of points, lines, and polygons. A point is pretty obvious. Just like a graph, a point is just a dot at a particular X and Y coordinate. A line is also pretty simple, it's just a straight line between two dots, though it can be extended to be a whole bunch of straight lines strung between a series of dots, one segment after the other. When a group of line segments, a minimum of three for obvious reasons, closes such that it begins where it ends, then it can be a polygon. Think of a polygon as a shape that has a center. It doesn't have to be geometrically nice, like a square or circle, it just has to have a continuous border that encompasses a center. In mapping, polygons are used to outline things like lakes, so they may have hundreds of short little line segments to define the shoreline.

Another interesting point about vector data is that, if the data is set up properly and the software can use it, it can allow routing. Routing is where you pick a place on the map and ask the computer to draw out a route that follows the roads in the maps. Most any mapping software can make routes from point to point, but only routing vector maps will allow the route to actually follow the curves of the roads, between the points.

The second thing you have to understand is that digital map data must be georeferenced to be useful. Georeferrencing is when you place particular raster images or vector data at particular places within your geographic framework. For example, a georeferrenced raster image may have its top-left corner set to one lat/long coordinate and the bottom-right set to another. Thus, mapping software can then "know" where that image is and place other data with it accordingly. This is the important point here: georeferencing allows you to combine different sets of map data together, so long as they have the same referencing system. If you had two raster images, properly georeferenced, you could bring them both up in the same mapping application and they will be displayed in the correct orientation, side by side for example. Alternatively, and this is the most common situation, you could have vector mapping data, a downloaded track from a GPS for example, overlayed on top of a raster image for a particular area. If everything is georeferenced properly, and all the data shares the same reference system, the vector and raster data should line up. Your track will go down the road.

Now, this is where digital mapping gets weird and difficult. The wonderful thing about geographic "references" is that there are so many to chose from. For two sets of mapping data to line up, they must have the same coordinate system, and the same projection, and the same datum, and the same spheroid. So, lets work through these one at a time:
  • The coordinate system is what the map data is measured in. Most nautical maps are in latitude and longitude. Hiking maps are often in UTM meters. But, even with this limited sample, things get more confusing, lat/long maps may be recorded in decimal degrees, or degrees-minutes-seconds or even a combination of those. UTM, or Universal Transverse Mercator, is not so simple either, what with the regions and all. So, the first thing to do when combining map data is to make sure all the data is using the same coordinate system.
  • A map projection is, to put it simply, how the map is distorted to represent a curved earth on a flat screen or paper. Anyone that has compared a paper map of Canada to a globe will have noted that Greenland, and the north in general, appears much bigger on the paper map. This is because paper maps distort the north, usually in the "Albers" projection. The alternative is to get those flattened "orange peel" maps. Hiking maps, because they are usually of much smaller scale, don't have to deal with as much distortion, so UTM works better. There are lots and lots of different projection systems out there. Albers and UTM are just a couple of the more common ones.
  • The map datum is where all the measurements are referenced from. Again, there are lots to chose from. The GPS world has, thankfully, standardised on the WGS84 datum. The Canadian 50k topographic hiking maps use NAD27. So, if you take your GPS and read off a nice UTM coordinate, then look it up on a paper hiking map, you will find that it's telling you that you are not where you really are, you will be off by almost a kilometer. To correct this, you will have to go into the settings of your GPS and set the display datum to match your paper map. Again, if you are going to combine mapping data, you have to make sure they are using the same reference or you won't get what you expect.
  • A spheroid is the mathematical model the mapping software uses to calculate how the earth curves. This is not quite as simple as you might think; the earth is not actually round. Thankfully, this really isn't too big a deal when dealing with small-scale maps, so you don't generally have to worry about it. It can become important if you are converting mapping data from different sources as an incorrect spheroid setting may shift the calculations, and thus your data, off by enough to be noticeable. But, for most of us, it doesn't factor in that much.

If you look at a paper map, or the "meta data" that is suppose to come with all your digital mapping information, it should list off all of this information: coordinate system, projection, datum, and spheroid. If you want to combine data sets, then make sure they are compatible, or that your mapping software can either convert or combine them on the fly.

The third thing to understand is that not displaying information is also important. If you tried to display all the information in your mapping data at the same time, all the time, then when you zoom in or out you would either have a lot of blank nothing at maximum zoom or a solid mass of gibberish at minimum zoom. Think of it this way, if you put all the information available on the 50k topographic maps onto the 250k topographic maps, then the 250k maps would be a useless mess. There are two map series for a reason, the 250k maps show much less detail but a much larger area. The two map series are, in a manner of speaking, two different zoom levels. Similarly, mapping software, either on your computer or on the GPS, must show different levels of detail depending on what zoom level you specify. Most GPS systems will have a "detail" level that controls this, to some extent, as does most computer mapping software. However, much of what is displayed, or not, is the choice of the cartographers that made the maps in the first place.

Cartography is as much an art as it is a science. Maps are not a pure representation of physical reality. Information is included, or excluded, emphasised or minimalised, as the cartographers see fit. If you start working with raw digital mapping data, you will quickly realise how important these decisions are to creating good looking, useful maps. Like photography, and so many other things, computers are spreading out the specialised tools of cartography to the general population. Anyone can start making maps now. However, like photography, don't expect world-class results without a lot of work.

No comments: