## 18 February 2011

### Basics of Digital Mapping

Vector vs Raster Maps: The most fundamental concept to grasp about any type of graphic data is making the distinction between vector data and raster data. These two data types are as different as night and day, yet they can look the same. For example, a question that commonly comes up is "How can I convert my TIFF files into DXF files?" The answer is "With difficulty," because TIFF is a raster data format and DXF™ (data interchange file) is a vector format. And converting from raster to vector is not simple. Raster maps are best suited to some applications while vector maps are suited to others.

Raster data represents a graphic object as a pattern of dots, whereas vector data represents the object as a set of lines drawn between specific points. Consider a line drawn diagonally on a piece of paper. A raster file would represent this image by subdividing the paper into a matrix of small rectangles-similar to a sheet of graph paper-called cells. Each cell is assigned a position in the data file and given a value based on the color at that position. White cells could be given the value 0; black cells, the value 1; grays would fall in-between. This data representation allows the user to easily reconstruct or visualize the original image.

A vector representation of the same diagonal line would record the position of the line by simply recording the coordinates of its starting and ending points. Each point would be expressed as two or three numbers (depending on whether the representation was 2D or 3D, often referred to as X,Y or X,Y,Z coordinates. The first number, X, is the distance between the point and the left side of the paper; Y, the distance between the point and the bottom of the paper; Z, the point's elevation above or below the paper. The vector is formed by joining the measured points.

Basic properties of raster and vector data: Each entity in a vector file appears as an individual data object. It is easy to record information about an object or to compute characteristics such as its exact length or surface area. It is much harder to derive this kind of information from a raster file because raster files contain little (and sometimes no) geometric information.

Some applications can be handled much more easily with raster techniques than with vector techniques. Raster works best for surface modeling and for applications where individual features are not important. For example, a raster surface model can be very useful for performing cut-and-fill analyses for road-building applications, but it doesn't tell you much about the characteristics of the road itself. Terrain elevations can be recorded in a raster format and used to construct digital elevation models (DEMs). Some land-use information comes in raster format.

Raster files are often larger than vector files. The raster representation of the line in the example above required a data value for each cell on the page, whereas the vector representation only required the positions of two points.