Raster graphics are digital images created or captured (for example, by scanning
in a photo or drawing) as a set of samples of a given space. A raster is a grid of
x and y coordinates on a display space. (And for three-dimensional images, a z coordinate.)
A raster image file identifies which of these coordinates to illuminate in monochrome
or color values. The raster file is sometimes referred to as a bitmap because it
contains information that is directly mapped to the display grid.
A raster file is usually larger than a vector graphics image file. A raster file
is usually difficult to modify without loss of information, although there are software
tools that can convert a raster file into a vector file for refinement and changes.
There are also some softwares, such as Wiseimage from Csoft that treat raster entities
as if they were in fact vectors, making changes easy to make. Examples of raster
image file types are: BMP, TIFF, GIF, and JPEG files.
Raster and vector are the two basic data structures for storing and manipulating
images and graphics data on a computer. Major GIS and CAD (Computer Aided Design)
software packages available today are primarily based on one of the two structures,
either raster based or vector based, while they have some extended functions to support
other data structures. Wiseimage for instance can have a single file format supporting
both raster and vector entities. This type of file is referred to as a hybrid file.
Raster images come in the form of individual pixels, and each spatial location or
resolution element has a pixel associated where the pixel value indicates the attribute,
such as color, elevation, or an ID number. Raster images are normally acquired by
optical scanner, digital CCD camera and other raster imaging devices. Its spatial
resolution is determined by the resolution of the acquisition device and the quality
of the original data source. Because a raster image has to have pixels for all spatial
locations, it is strictly limited by how big a spatial area it can represent. When
increasing the spatial resolution by 2 times, the total size of a two-dimensional
raster image will increase by 4 times because the number of pixels is doubled in
both X and Y dimensions. The same is true when a larger area is to be covered when
using same spatial resolution.
To increase the resolution of a raster file the user needs to increase the DPI (dots
per inch) however when this is done the file size increases to. In general, vector
data structure produces smaller file size than raster image because a raster image
needs space for all pixels (dpi) while only point coordinates are stored in vector
representation. This is particularly true in the case when the graphics or images
have large homogenous regions and the boundaries and shapes are the primary interest.
Besides the size issue, vector data is easier than raster data to handle on a computer
because it has fewer data items and it is more flexible to be adjusted for different
scale, for example, a projection system in mapping application. This makes vector
data structure the apparent choice for most mapping, GIS and CAD software packages.
Also, topology among graphical objects or items are much easier to be represented
using vector form, since a commonly shared edge can be easily defined according to
its left and right side polygons. On the other hand, this is almost impossible or
very difficult to do with pixels.