Go to previous pageGo to next page

1.3.2. Data Formats

Maps on computers of mobile devices are stored as graphics. There are two main format types for graphics and thus also for maps. These formats differ a lot in terms of applicability for different grapic types but also in file size and rendering speed. This and the following unit will give a short introduction in the capabilities and drawbacks while using raster or vector maps for the display on mobile devices. For more information about image formats check out the lesson Internet Techniques and Web Formats or for example the tutorial "Looking Behind the Pretty Pictures" (Peck).

Raster Maps

A raster graphics image, digital image, or bitmap, is a data file or structure representing a generally rectangular grid of pixels, or points of colour, on a computer monitor, paper, or other display device. The colour of each pixel is individually defined; images in the RGB colour space, for instance, often consist of coloured pixels defined by three bytes—one byte each for red, green and blue. Less colourful images require less information per pixel; an image with only black and white pixels requires only a single bit for each pixel (WIKIPEDIA).

Raster ExampleRaster Example

Vector Maps

Vector graphics or geometric modeling is the use of geometrical primitives such as points, lines, curves, and polygons to represent images in computer graphics (WIKIPEDIA).

Vector ExampleVector Example

The advantages of vector images seem obvious. While raster graphics are defined in terms of individual pixels, vector graphics only store coordinates, lines, curves and the fill or line colour. Raster graphics have a defined height and width and look pixelated if enlarged beyond these boundaries, vector graphics render themselves to the space given to them, such that they are resolution independent. Thus also the file size of a vector image remains always the same, independent of the size the graphic is displayed. A larger raster image however results always in a bigger file.

pixels GIF SVG
16x16 110 Bytes110 Bytes 961 Bytes
32x32 188 Bytes188 Bytes 961 Bytes
64x64 375 Bytes375 Bytes 961 Bytes
128x128 780 Bytes780 Bytes 961 Bytes
256x256 1646 Bytes1646 Bytes 961 Bytes
File size differences GIF - SVG

The size of a vector graphic is only dependent on the amount of information, coordinates, arcs, lines and polygons, that are shown in it. Thus vector graphics are especially suited for logos or illustrations were a limited number of objects and different colours are used.

As all graphics are visualised on a computer or mobile device display as raster (see Computer Graphics), every vector image has to be rasterized before it can be displayed. Thus on the one hand vector graphics often have smaller file sizes as a raster image and can be transfered faster to the mobile device. But on the other hand the mobile device needs more time for generating the displayable image. This issue will alse be discussed in the next section Data Amount.

Why still using raster?

For images where almost every pixel contains different information such as photographs vector files are not appropriate. The vector file would be even larger than the same raster image.

raster photograph (JPEG 29.3KB)raster photograph (JPEG 29.3KB) vector photograph (SVGZ 153KB, SVG 535KB)

The photographs above show the disadvantages of the vector format. Many different pixels as they occur with the colour gradients in an image are almost impossible to display in a vector image. When approximating a raster image a rather sketchy image is generated. Due to the large number of different polygons in the image the file size is even much larger than the raster. If you click with the right mouse button on the right image and choose "Zoom In" you can see that the vector image of the photograph consists of approx 2500 small polygons.



Go to previous page
Go to next page