Shapes and locations of features on maps need to be described in numbers so the information can be read by computers.
Computers store information in sequences of binary digits (bits), which form a code for every possible number or letter. Coincidentally maps reference geographical locations on the earth's surface through a system of coordinates. These coordinate systems can be local, national or international. Look at Ordnance Survey (OS) paper maps and you will notice, along the sides, there are a series of numbers associated with a grid covering the whole map area.
These numbers refer to coordinates from the British National Grid. All locations and shapes can be defined in terms of x and y coordinates from a given grid system. These numerical values can be used to translate map information into digital form, in both vector and raster formats.
Raster data
Raster data can be thought of as being similar to a digital photograph. The entire area of the map is subdivided into a grid of tiny cells, or pixels. A value is stored in each of these cells to represent the nature of whatever is present at the corresponding location on the ground.
The major use of raster data involves storing map information as digital images, in which the cell values relate to the pixel colours of the image. To reproduce the image the computer reads each of these cell values one by one and applies them to the pixels on the screen.
Vector data
Vector data can be thought of as a list of values. The features are recorded one by one, with shape being defined by the numerical values of the pairs of xy coordinates, so that:
- A point is defined by a single pair of coordinate values.
- A line is defined by a sequence of coordinate pairs defining the points through which the line is drawn.
- An area is defined in a similar way, only with the first and last points joined to make a complete enclosure.
The position and shape of a building is captured as a series of four pairs of numerical coordinates. To reproduce the building in a GIS the computer reads these values and draws a line linking the coordinate positions.
The vector version can also store additional context information about these features – the attributes – a very important aspect.
Raster vs vector
Both types of data are very useful, but there are important differences.